Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a matrix to show KPI performance with multiple KPI's (field name = job_kpi) and also whether they have passed or failed each month (this is field name = kpi_check).
What I am trying to do is to get the percentage values to display the correct values each month for the pass and fail fields.
So for KPI 1 for April 2021 it would do a calculation for fail of (100/103)*3 but for pass it would do (100/103)*100.
I'm new to power bi / dax so not sure if this is possible - and if so how would I code it so that the figure only looks at the KPI in question, and then does the calculation based on that month only?
Solved! Go to Solution.
Hi @Rob_Morris ,
According to your description, I create a sample.
Here's my solution.
Create a measure.
% =
VAR _Parent =
IF (
ISFILTERED ( 'Table'[KPI Status] ),
CALCULATE ( COUNT ( 'Table'[KPI Status] ), ALL ( 'Table'[KPI Status] ) ),
CALCULATE ( COUNT ( 'Table'[KPI Status] ), ALL ( 'Table'[Job_kpi] ) )
)
RETURN
DIVIDE ( COUNT ( 'Table'[KPI Status] ), _Parent )
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Rob_Morris ,
According to your description, I create a sample.
Here's my solution.
Create a measure.
% =
VAR _Parent =
IF (
ISFILTERED ( 'Table'[KPI Status] ),
CALCULATE ( COUNT ( 'Table'[KPI Status] ), ALL ( 'Table'[KPI Status] ) ),
CALCULATE ( COUNT ( 'Table'[KPI Status] ), ALL ( 'Table'[Job_kpi] ) )
)
RETURN
DIVIDE ( COUNT ( 'Table'[KPI Status] ), _Parent )
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Brilliant! Thanks for this it's sorted the issue perfectly.
Instead of showing as percentage of column total, show as percentage of parent total.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
211 | |
86 | |
64 | |
59 | |
56 |