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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.