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
abv46mac
Regular Visitor

Percentage of grand total

Hi!

 

I'm trying to get percentafe of gran total in a matrix. In that matrix i've got normal values. How i can do that? 

1 ACCEPTED SOLUTION

@abv46mac

 

If you want to ignore the filter, you can replace ALLSELECTED with ALL().

 

Measure = CALCULATE(SUM(Table[Value]),ALL(Table))

 

Pct= SUM(Table[Value])/CALCULATE(SUM(Table[Value]),ALL(Table))

 Regards,

View solution in original post

3 REPLIES 3
v-sihou-msft
Employee
Employee

@abv46mac

 

You can create a measure with ALLSESLECTED to get the grand total within matrix. 

 

Measure = CALCULATE(SUM(Table[Value]),ALLSELSECTED(Table))

Then you can have cell level field divided by above measure:

 

Pct= SUM(Table[Value])/CALCULATE(SUM(Table[Value]),ALLSELSECTED(Table))

Regards,

 Hi Simon, first thanks for your reply.

 

It works nicely but, allselected keep the filters outside the query, is there any possible to avoid this?

 

When I agregate 2 dimensions in cascade the percentage doens't work, I thin might be beacuse of filters.

 

thanks in advance.

@abv46mac

 

If you want to ignore the filter, you can replace ALLSELECTED with ALL().

 

Measure = CALCULATE(SUM(Table[Value]),ALL(Table))

 

Pct= SUM(Table[Value])/CALCULATE(SUM(Table[Value]),ALL(Table))

 Regards,

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.