The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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:
What am I doing wrong here?
Solved! Go to Solution.
@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%).
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:
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
Thank you both for your helpful reply. I managed to solve this minor issue 🙂
Happy to help 🙂
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:
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
@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%).