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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!