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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
JohnOoijen
New Member

Measure percentage that a value exists in column

I'm trying to add a card, that visualizes the compliancy rate of my Intune environment. In percentage.

 

Devices are compliant when they have a ComplianceStateKey 18409

So, basically, I have to count all rows in the table, count all "18409" in the CompliancyStateKey column, and divide those #18409 by #AllRows. Then convert to Percentage, ét voila.

Well, as a rookie, that's more difficult than it sounds 🙂

 

I created a measure:

Compliance Percentage = DIVIDE (
CALCULATE(
COUNT(devices[complianceStateKey]), devices[complianceStateKey] = 18409 ),
COUNTA(devices[complianceStateKey])
)

This measure returns 0.95. Which sounds good, because currently my compliance rate is 95,01%.

However, when I choose "Show value as > Percent of grant total", it changes to 100,00%. ?

 

To visualize:

Untitled 2.png

 

What am I doing wrong here?

 

2 ACCEPTED SOLUTIONS
zenisekd
Super User
Super User

@JohnOoijen , nothing is wrong with your measure. To solve your problem, simply format the outcome of the measure as percentage. The reason you see 100% when showing the value as percent of grant total is that it divides row by the total. So the row value is 0,95 and total is 0.95 when you divide it, you get 1 (100%).

zenisekd_6-1703444847994.png

 

 

 

View solution in original post

Ritaf1983
Super User
Super User

Hi @JohnOoijen 

Your measure is already the percent that you a trying to achieve, so the option that you should use is "show without calculation".

To see it as 95% and not 0.95, you need just to format the number that you got as a percent:

Ritaf1983_0-1703476193279.png

From an efficient data visualization perspective, to save the pixels for "%" that repeats on every row, I recommend

to multiply your measure by 100 and move the percent sign to the headers " Compliancy rate (%)"

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
JohnOoijen
New Member

@zenisekd@Ritaf1983 

Thank you both for your helpful reply. I managed to solve this minor issue 🙂

Happy to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @JohnOoijen 

Your measure is already the percent that you a trying to achieve, so the option that you should use is "show without calculation".

To see it as 95% and not 0.95, you need just to format the number that you got as a percent:

Ritaf1983_0-1703476193279.png

From an efficient data visualization perspective, to save the pixels for "%" that repeats on every row, I recommend

to multiply your measure by 100 and move the percent sign to the headers " Compliancy rate (%)"

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
zenisekd
Super User
Super User

@JohnOoijen , nothing is wrong with your measure. To solve your problem, simply format the outcome of the measure as percentage. The reason you see 100% when showing the value as percent of grant total is that it divides row by the total. So the row value is 0,95 and total is 0.95 when you divide it, you get 1 (100%).

zenisekd_6-1703444847994.png

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors