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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

% of grand total by field parameter

Hi Experts,

 

Can you help me with a measure so I can show the percentage by Service on the following bar chart:

 

SophRow_0-1685940265818.png

 

So for Total Services, the % would be (by Illness Burden Category per example above):

 

  • 1-5: 3.8%
  • 6-10: 8.7%
  • 11-15: 19.7%
  • 16-20: 67.8%

The data looks like this:

 

SophRow_1-1685940422146.png

 

And the Illness burden category is a field parameter:

 

SophRow_2-1685940464947.png

 

When I switch to Age range and Gender, I also want the chart to show % of total by Service. 

 

Thanks in advance 🙂

Soph

 

3 REPLIES 3
data_freak
Regular Visitor

Hey @Anonymous 

Apologies for the confusion. The use of SUM('Table'[Count]) and [Total Count] in my previous response was incorrect. There is no difference between them, and it was an oversight on my part.

To clarify, you only need to create the "Total Count" measure using the formula. Hope this helps!

data_freak
Regular Visitor

Hi @Anonymous 

 

I think the following steps should help in solving this problem:

 

  • Start by creating a bar chart with the Service as the axis and the count of records as the value.
  • Create a new measure to calculate the total count of records. You can use the following DAX formula:

Total Count = SUM('YourTable'[YourCount field])

 

  • Create another measure to calculate the percentage by service. You can use the following DAX formula:

Percentage by Service = DIVIDE(SUM('Table'[Count]), [Total Count])

 

  • Add the newly created "Percentage by Service" measure to the Values section of the visual. Make sure it is set to display as a percentage. Next, to switch to Age range and Gender, create a slicer or dropdown list for the Illness burden category field.
  • Add the Illness burden category field to the visual as a legend or axis, depending on your desired visual representation.
  • Now, when you select different values in the Illness burden category slicer or dropdown list, the bar chart will automatically update to show the percentage of the total by service based on the selected category.

 

Please cross check that you have the appropriate relationships established between the tables in your data model to ensure accurate calculations.

 

If this has solved your problem, please mark my post as solution.

Cheers

Anonymous
Not applicable

Thanks @data_freak - just a quick Q - for the % by service measure, what's the difference between SUM('Table'[Count]) and Total Count?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors