Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DaneM123
Frequent Visitor

Re-calculate percentage when drilling between levels

I'm currently working with some data on the number of organisations using a piece of software, and need to be able to plot its use over time with the ability to drill between Region and Subregion level (a basic version of the data is copied below; Total refers to the number of organisations in the subregion). I added a measure to calculate the percentage or organisations live, but the problem I have is that when I go up to Region level, rather than re-calculating the percentage for the region it just gives an average of the percentages for the individual subregions which obviously gives the wrong answer. How would I go about getting it to re-calculate the percentage live at each level so I can get the correct figure?

 

RegionSubregionDateTotalLive
AA1JAN103
AA1FEB106
AA1MAR109
AA2JAN52
AA2FEB54
AA2MAR55
BB1JAN103
BB1FEB106
BB1MAR109
BB2JAN52
BB2FEB54
BB2MAR55
1 ACCEPTED SOLUTION

@DaneM123,


Create the following measure in your table.

Measure = SUM(Table[Live])/SUM(Table[Total])
1.JPG2.JPG

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

@DaneM123,

What is your expected result in subregion level and region level? What formula do you use to create the percentage?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for getting back to me.

 

At the moment I'm just using a really basic percentage calculation, i.e. number live/total, which works fine for the individual rows. So using January's data as an example, for subregion A1 it gives 30% live (3 live out of 10 organisations) and for A2 it is 40% (2 out of 5).

 

When moving up to Region level, for region A this should give a result of 33.3% live, i.e. 5 organisation live out of 15. However, because it takes the average of the results from the two subregions, it actually gives a result of 35% ((30+40)/2).

@DaneM123,


Create the following measure in your table.

Measure = SUM(Table[Live])/SUM(Table[Total])
1.JPG2.JPG

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That's worked - thanks so much. I knew it would turn out to be somethign really simple!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.