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
po
Post Prodigy
Post Prodigy

scorecard percentage of kpis met and sum of calculated measure

Hi,

 

Have a scorecard with below which a matrix and below conditional formatting set based on a calculated measure

would want to calculate the % of kpis achieved

e.g on figure 2 third row 8 kpis but only 6 passed thus would want to show 75%

 

how best can this be achieved - don't have option of  sum(<calculated measure) 

As can see below even if try display the total of the column not working.

 

At row level o.k in that sets flag value (fail, average, pass) correctly

figure1

overall2.JPG

figure2

overall.JPG

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@po ,

 

You may refer to the following post.

https://community.powerbi.com/t5/Desktop/Need-count-for-matrix-non-zero-values/m-p/406361#M186090

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for suggestion.

 

got below working

 

No. of Weekly KPIs met = IF (
HASONEVALUE ( Targets[KPI Name] ),
[KPI Flag],
COUNTROWS (
FILTER ( VALUES ( Targets[KPI Name] ), CALCULATE ( SUMX ( VALUES ( Targets[KPI Name] ), [KPI Flag] ) ) >= 0 )
)
)

 

this shows level 100% below as no reds or yellows.

 

However, what if we wanted to count the number of fails in the region i.e the ones which are highlighted in yellow or red below.  How could this be achieved?

 

The red or yellow setting is determined by kpi_flag which is a calculated measure and cannot do a simple sum on calculated measure.

 
 
screenshot2.JPG
 
 
kpi flag set calculated measure set as
 

KPI Flag =
SWITCH(
TRUE(),

MAX(Targets[KPI Unit]) = "£",
SWITCH(TRUE(),

[KPI Currency Value] > [KPI Currency Target Max],-1,
[KPI Currency Value] <= [KPI Currency Target Max] &&
[KPI Currency Value] > [KPI Currency Target Min],0,1),

MAX(Targets[KPI Unit]) = "%" ,
SWITCH(TRUE(),

[KPI Percentage Value] < [KPI Percentage Target Max],-1,
[KPI Percentage Value] >= [KPI Percentage Target Max] &&
[KPI Percentage Value] < [KPI Percentage Target Min],0,1),

MAX(Targets[KPI Unit]) = "#",
SWITCH(TRUE(),

[KPI Score Value] > [KPI Score Target Max],-1,
[KPI Score Value] <= [KPI Score Target Max] &&
[KPI Score Value] > [KPI Score Target Min],0,1),


-2
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors