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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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 is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.