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
PhoenixBird66
Helper III
Helper III

Measure to show % of row total

I have created a Matrix which shows the Count of responses for each possible answer to a number of questions. I've then used the built in functionality in Power BI Desktop to display the same measure as a percentage of the row total. But the problem is it shows it to 2 decimal places, and I need it to be displayed with 0 decimal places. 

 

I understand this is not available and therefore I need to create a calculation to acheieve this, but I dont know what that calulation should be. 

 

This is the measure I used to get the Count -

Count = DISTINCTCOUNT('Metadata-S&B'[Metadata - id])+0
 
Any ideas? I'm stumped!!

 

Capture.JPG

1 ACCEPTED SOLUTION

Hi @PhoenixBird66 

 

Sorry for my late reply. here you go:

Measure = DIVIDE([S&B_Count],SUMX(FILTER(ALLSELECTED('Metadata-S&B'),'Metadata-S&B'[Question] in FILTERS('Metadata-S&B'[Question])),[S&B_Count]))

Capture.PNG

 

Pbix attached. 

Community Support Team _ Dina Ye
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

6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @PhoenixBird66 

 

When you create the measure, did you try to modify the number of decimal places in the format panel?

002.PNG

 

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

I didnt create the measure -I just used the functionality to show a measure as a % of the row total, like this:

 

PhoenixBird66_0-1593592345096.png

In order to do as you've suggested I need to make a measure for it, but I dont know what the calculation would be.

 

Hi  @PhoenixBird66 

 

I just tested it on my side, and found the same issue as yours, I'd suggest you raise it as an issue in the portal:

https://community.powerbi.com/t5/Issues/idb-p/Issues 

 

But there's a workaround to fix it by creating a measure, you might consider share the dummy pbix that I can draw it up for you.

 

 

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

Hi @PhoenixBird66 

 

Sorry for my late reply. here you go:

Measure = DIVIDE([S&B_Count],SUMX(FILTER(ALLSELECTED('Metadata-S&B'),'Metadata-S&B'[Question] in FILTERS('Metadata-S&B'[Question])),[S&B_Count]))

Capture.PNG

 

Pbix attached. 

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

Thanks for your help. 

I want to replicate the "% of Row Total" calculation as a measure so that I can remove the decimal places.

I've got a dummy Power BI report, but I cannot see where to upload it!

 

 

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.