Forum Discussion

F_Reh's avatar
F_Reh
Icon for Post Patron rankPost Patron
1 year ago
Solved

Percentages all 100% in Multi-Row Card :-(

Good Afternoon,

 

I have a scenario where two column fields are:

 

1) Decile (i.e. 1,2,3...10).

2) Age Range (i.e. 0-4,5-9 to 100-104).

 

I decided to:

 

A) Make separate Multi-Row cards for each Decile Value ( i.e. that is ten cards !).

 

B) Each Card would contain all Age Range groups, and list each in descending order for which each Age Group row count contributes to 100% for the total for that decile. Please note the percentage is not where one field for the age group is divided over another field for the same age group. It is the row count for each Age group divided over the total row count for All Age-groups (for the decile which the Card relates to).

 

"Had" I been constructing a Matrix for this I would very simply have been able to use the 'Percent of Column Total' menu option as follows:

 

 

Anyway, in the Multi-row card scenario for purposes of Decile 1, I put a visual-level filter on the first Multi-row card where I set decile to 1:

 

 

I also created these three measures:

 

Total_Deciles_1 = CALCULATE(SUM(X[Count]), filter(X,X[Index of Decile] =1))

 

Count_ = CALCULATE(SUM(X[Count])) + 0

 

percentage of age group 1 = DIVIDE([Count_],X[Total_Deciles_1])

 

 

Where [Count_] is supposed to be the age range-specific row count (within Decile 1), and X[Total_Deciles_1] is supposed to be the total row count for Decile 1 in the Table X.

 

percentage of age group 1 being used in the Multi-Row card for Decile 1:

 

 

However, unfortunately the visual shows 100% for each Age Range groups:

 

 

Kindly advise what I need to correct, or whether I need to approach this differently.

 

 

  • As far as resolving my issue (as I understood the requirement), I resolved it as following.

     

    For each Multi-row card, I individually filtered  the Decile value which the visual is representing:

     

     

    Then set each age group as a percentage of all the Age groups Total (i.e. 'Grand Total' for that specific Decile).

     

     

    This appear analogous to 'Percent of Column Total' in the Matrix i referred to in my 1st post above:

     

     

     

6 Replies

  • F_Reh's avatar
    F_Reh
    Icon for Post Patron rankPost Patron

    As far as resolving my issue (as I understood the requirement), I resolved it as following.

     

    For each Multi-row card, I individually filtered  the Decile value which the visual is representing:

     

     

    Then set each age group as a percentage of all the Age groups Total (i.e. 'Grand Total' for that specific Decile).

     

     

    This appear analogous to 'Percent of Column Total' in the Matrix i referred to in my 1st post above:

     

     

     

    • v-sgandrathi's avatar
      v-sgandrathi
      Icon for Community Support rankCommunity Support

      Hi F_Reh,

       

      I'm glad you found a solution and resloved  the query. Thank you very much for sharing here.

      Kindly mark your reply as the accepted solution so that others in the community can find it quickly.

       

      Thankyou for connecting with Microsoft Community Forum.

  • Hi F_Reh ,

     

    The question is around the question of the total value, if you  don't change the filter context to get all the values doing the SUM of the measure it will return the exact same value of that measure.

     

    Try the following:

     

    Count_ = CALCULATE(SUM(X[Count]), REMOVEFILTER(X[Age Range])) + 0

     

    This should give you the expected value since we are removing the Age Range from the calculation, if you only want to have this at the specific decile

     

    Count_ = CALCULATE(SUM(X[Count]), REMOVEFILTER(X[Age Range]), X[Index of Decile]=1) + 0
  • v-sgandrathi's avatar
    v-sgandrathi
    Icon for Community Support rankCommunity Support

    Hi F_Reh,

    Thank you MFelix for your response to the query.

    Has your issue been resolved?
    If the response provided by the community member addressed your query, could you please confirm?
    It helps us ensure that the solutions provided are effective and beneficial for everyone.

     

    Thank you for your understanding!

    • v-sgandrathi's avatar
      v-sgandrathi
      Icon for Community Support rankCommunity Support

      Hi F_Reh,

       

      Just looping back one last time to check if everything's good on your end. Let me know if you need any final support happy to assist if anything’s still open.

       

      Thank you.

      • v-sgandrathi's avatar
        v-sgandrathi
        Icon for Community Support rankCommunity Support

        Hi @,

         

        Just wanted to follow up and confirm that everything has been going well on this. Please let me know if there’s anything from our end.
        Please feel free to reach out Microsoft fabric community forum.