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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
KeepCalm007
Helper I
Helper I

DAX Help - Calculation with Filters for KPI data

 

Hello Power BI community

 

I have a table of KPI data for a list of services.

 

Each service has different KPI light indicator ranges based on the group it is from. I was able to create a column to show KPI lights for each service's quarter 1 results based on their individual targets using the switch function - this is working fine.

 

The problem I have is with the overall group KPI. This is the calculation I am having difficulty with.

 

I have tried combinations of Switch and Calculate and Filter functions, but must be getting the order of things wrong, I have gotten the error message: "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."

 

The KPI result for a group depends on the achievement of the individual services:

 

Thresholds.PNG

If it helps, this is a screen snip of the data in Power BI:

 

kpi.PNG

 

What I want to achieve is having a traffic light KPI show for each Group A-E, based on the results achieved by the individual services within that group.

 

kpilights.PNG

 

Tips and advice appreciated regarding the DAX structure appreciated.

 

 

2 REPLIES 2
v-danhe-msft
Employee
Employee

Hi @KeepCalm007,

Based on my research, it seemed that you could use the "UNCHAIR" function to switch you data to different KPI symbol, you could refer to below link:

https://community.powerbi.com/t5/Community-Blog/Power-BI-Desktop-DAX-Using-Unicode-Arrows-as-Measure...

 

https://blog.crossjoin.co.uk/2017/04/11/the-dax-unichar-function-and-how-to-use-it-in-measures-for-d...

 

Regards,

Daniel He

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

Hi Daniel @v-danhe-msft

Thanks for your suggestion. However, it is not the output symbol I am having difficulty with, it is the calculation (formula) to get the right one for each 'group'.

 

In the examples you provided, the measure is based the same conditions for the whole length of the column whether an upward arrow or downward arrow is showing.

 

This is not the case for my situation 😞

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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