Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Coaches,
I am new to Power BI.
I have 3 columns - Model ID, Materiality, RAG status
I am able to achieve the count of model IDs that have materiality-high, and RAG status- Green
However, the ask is to get the percentage as a KPI card which I am struggling with.
In the above image, count of model IDs that are green and have materiality- high is 25.
and same is shown in percentage as 68%.
This percentage KPI is stand alone, and I am not able to achieve this.
PLease help me with this.
@parry2k @amitchandak @Ritaf1983 @Ahmedx
Solved! Go to Solution.
You'll want to ensure you have the Filter context the same for both items in your KPI (which it doesn't look like there is). One way to do that is to ensure that your averages are calculated at the right grain. Judging by your Matrix visual - and understanding this as a % of the total population you'll want some DAX in a measure that is something to this effect :
KPI Measure =
VAR _GreenAndHigh = FILTER(
'YourTable',
'YourTable'[RAG Status] = "Green" && 'YourTable'[Materiality] = "High"
)
VAR _GreenHighCount = COUNTROWS(_GreenAndHigh)
VAR _TotalPop = COUNTROWS('YourTable')
VAR _Result = DIVIDE(_GreenHighCount, _TotalPop)
RETURN
_Result
Side note - make sure you actually have your API filtered to the timeframe you have in the header "Apr-23", else you'll be missing context.
Can you upload the pbix file?
You'll want to ensure you have the Filter context the same for both items in your KPI (which it doesn't look like there is). One way to do that is to ensure that your averages are calculated at the right grain. Judging by your Matrix visual - and understanding this as a % of the total population you'll want some DAX in a measure that is something to this effect :
KPI Measure =
VAR _GreenAndHigh = FILTER(
'YourTable',
'YourTable'[RAG Status] = "Green" && 'YourTable'[Materiality] = "High"
)
VAR _GreenHighCount = COUNTROWS(_GreenAndHigh)
VAR _TotalPop = COUNTROWS('YourTable')
VAR _Result = DIVIDE(_GreenHighCount, _TotalPop)
RETURN
_Result
Side note - make sure you actually have your API filtered to the timeframe you have in the header "Apr-23", else you'll be missing context.
@Erokor Thank you so much for the quick help. With your DAX expression, I was able to achieve the rquiremnet with some little changes here & there.
Kudos!!
User | Count |
---|---|
94 | |
80 | |
76 | |
65 | |
60 |
User | Count |
---|---|
108 | |
101 | |
77 | |
63 | |
61 |