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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
ManuelGeiger
Helper I
Helper I

DAX to summarize multiple ratings

Hi all,

 

I would like to create a measue to show the overall oil condition of multiple different oil tests.

In the screenshot below you can see different results for multiple components of one maschine (action needed (action), caution, normal (all good)) and I would like to summarize those results to show them in an end result per maschine.

The logic should be this:

All components normal -> result: normal

At least one component caution but rest normal -> result: caution

At least one component action -> result: action

 

Maybe someone has an idea how to create such measure?

ManuelGeiger_0-1669042560658.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Try to create a new with the code below:

Measure =
VAR _min = MIN(TableName[Ranking])
RETURN
IF(
     _min = "Action",
    "Action",
    IF(
         _min = "Caution",
        "Caution",
        "Normal"
      )
)
 
I tried and it worked like this:
FreemanZ_0-1669045708753.png
 
dataset:
FreemanZ_1-1669045727670.png

 

 

View solution in original post

2 REPLIES 2
ManuelGeiger
Helper I
Helper I

Works perfectly fine, thank you!

FreemanZ
Super User
Super User

Try to create a new with the code below:

Measure =
VAR _min = MIN(TableName[Ranking])
RETURN
IF(
     _min = "Action",
    "Action",
    IF(
         _min = "Caution",
        "Caution",
        "Normal"
      )
)
 
I tried and it worked like this:
FreemanZ_0-1669045708753.png
 
dataset:
FreemanZ_1-1669045727670.png

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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