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
Anonymous
Not applicable

% of Grand Total by Individual Report

I am building a tool in Power BI that is taking multiple, individual reports and aggregating them into one giant report so that I can measure certain metrics across all of the reports. (For extra clarity: the individual reports use the exact same columns. It's a recurring report and I'm wanting to track certain metrics over time)

 

Here's an example: Let's say you have a report that has four columns: Apples, Oranges, and Week of the Year.

 

Report 1:

State Apples Oranges Week of the Year

California341
Texas261
Oregon431

 

Report 2:

State Apples Oranges Week of the Year

California512
Texas782
Oregon652

 

What my report would be trying to do (in the above example) would be track the percentage of the grand total of apples sold within the different states by Week. (E.g. for California, Week 1 should show 25% (3 apples from California/12 total apples) and Week 2 would show 28% (5 apples from California/18 total apples)).

 

The issue is that I can't seem to figure out the way to get Power BI to show % of Grand Total by individual report. When I aggregate my reports and start putting them in visuals, I'm performing the Quick Calc to show % of Grand Total. What Power BI ends up showing is the % of the aggregated grand total. In my example above, this would be the equivalent of California reporting 27% of total apples sold (8 apples from California/30 total apples).

 

Is there a way that anyone knows of to make Power BI show % of Grand Total relative to individual reports? Or maybe of another way to get the information that I'm looking for?

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Maybe add two calculated measures

 

Apples Sum of Week = CALCULATE(sum('Reports'[Apples]),ALLEXCEPT('Reports',Reports[Week of the Year])) 

Apples Sum of Week Percent = DIVIDE(sum('Reports'[Apples]),[Apples Sum of Week])

 

And format the 2nd measure as a percent.  Let me know how you get on.  If it works you can repeat for Oranges (just don't compare them (boom boom))


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Phil_Seamark
Employee
Employee

Maybe add two calculated measures

 

Apples Sum of Week = CALCULATE(sum('Reports'[Apples]),ALLEXCEPT('Reports',Reports[Week of the Year])) 

Apples Sum of Week Percent = DIVIDE(sum('Reports'[Apples]),[Apples Sum of Week])

 

And format the 2nd measure as a percent.  Let me know how you get on.  If it works you can repeat for Oranges (just don't compare them (boom boom))


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

@Phil_Seamark

 

One last part to the question: if I wanted to add an additional dimension for Fruit Quality that is a child underneath the State dimension, how can I make the % of Total dynamically change to work with whatever level of dimension I'm working in?

 

For example (we'll just stick with Apples right now), see this pivot table:
Apples_Example.png

 

 

What I would like to be able to do is dig down into the Fruit Quality dimension and see the total percentage of "Above Average" apples sold within California (1 Above Average apple/3 total apples from California in week 1, 3 Above Average apples/5 total apples from California in week 2, etc.)

 

What I'm currently seeing when I'm only looking at the State level is % of Apples, by State, by week (yay!); however, when I zoom in to look at a specific state, the numbers reported there seem to follow this formula: (Total Above Average Apples in California)/(Total Apples Sold Across All States). Does that make sense?

 

I appreciate any help and advice. Let me know if I need to reword something to make it make more sense.

Anonymous
Not applicable

You're a genius. Thank you so much!

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.