none
PERCENTAGE

    Question

  • Hi Professionals,

    I have a requirement which is shown in the image below. The image is not perfect but that is what I have. 

    Here Plan A Is the parent group & C, D are child group for the Plan A. Gender is the column group which is categorized into M & F. I got all the counts except percentage share. What is the expression i have to use to get it. Please help me out.

    Thanks


    sush

    Thursday, July 17, 2014 9:34 PM

Answers

  • Hi sush,

    According to your description, you want to create a matrix which has a group total for each group. Now you want to calculate the amount percentage of all plans for each plan. Right?

    In this scenario, we can use ReportItems to get the values of the amount for each group and all groups. Then we just divide these two values to get the percentage. We have teseted this scenario in our local environment. Here are screenshots for your reference:

    

    Reference:
    ReportItems Collection References (Report Builder and SSRS)

    If you have any question, please feel free to ask.

    Best Regards,
    Simon Hou

    • Proposed as answer by Uri DimantMVP Sunday, July 20, 2014 10:52 AM
    • Marked as answer by susheel1347 Sunday, July 20, 2014 11:19 PM
    Sunday, July 20, 2014 9:25 AM
    Moderator
  • I think this

    For male
    total
    ------
    =SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"PlanLevelGroupName")
    
    % share
    ------------
    
    =SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"PlanLevelGroupName")/IIF(SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"TablixName")>0,SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"TablixName"),Nothing)
    
    

    and for female just replace M with F in above expressions


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by susheel1347 Sunday, July 20, 2014 11:19 PM
    Sunday, July 20, 2014 12:16 PM

All replies

  • Hi sush,

    According to your description, you want to create a matrix which has a group total for each group. Now you want to calculate the amount percentage of all plans for each plan. Right?

    In this scenario, we can use ReportItems to get the values of the amount for each group and all groups. Then we just divide these two values to get the percentage. We have teseted this scenario in our local environment. Here are screenshots for your reference:

    

    Reference:
    ReportItems Collection References (Report Builder and SSRS)

    If you have any question, please feel free to ask.

    Best Regards,
    Simon Hou

    • Proposed as answer by Uri DimantMVP Sunday, July 20, 2014 10:52 AM
    • Marked as answer by susheel1347 Sunday, July 20, 2014 11:19 PM
    Sunday, July 20, 2014 9:25 AM
    Moderator
  • I think this

    For male
    total
    ------
    =SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"PlanLevelGroupName")
    
    % share
    ------------
    
    =SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"PlanLevelGroupName")/IIF(SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"TablixName")>0,SUM(IIF(Fields!Gender.Value = "M",Fields!YourField.Value,0),"TablixName"),Nothing)
    
    

    and for female just replace M with F in above expressions


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by susheel1347 Sunday, July 20, 2014 11:19 PM
    Sunday, July 20, 2014 12:16 PM