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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Aleksandra_MLT
Advocate I
Advocate I

Categorize by one of the values

Hi all. Seemed simple one but got stuck here:

There is a list of devices (ID) which can send an error or informational event. Some ID's can have both status messages. What I would like to do is categorize them in a way so if there is an error and informational event for same ID, it would say 'error'. Kind of ranking.

Both M and Dax solutions are welcome. Thank you in advance.

 

status.PNG

1 ACCEPTED SOLUTION

Thank you, @Greg_Deckler and @VahidDM .

I applied the following and that seems to work:

=CALCULATE(MIN('Table'[Status]) ,ALLEXCEPT('Table', 'Table'[ID]))

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

@Aleksandra_MLT Maybe MIN([IsError])?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi, @Greg_Deckler .

 

IsError is my desired output. So I used MIN([Status]) and it creates a column with "Error" value only. 

@Aleksandra_MLT Yeah, my thought was a measure and you are correct, I meant MIN([Status]), If a column you could do:

MINX(FILTER('Table',[ID]=EARLIER([ID])),[Status])



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Aleksandra_MLT 

 

Try to add a column with this DAX code:

 

IsError = 
VAR _Error =
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Status] ),
        ALLEXCEPT ( 'Table', 'Table'[ID] )
    )
RETURN
    IF ( _Error > 1 || 'Table'[Status] = "Error", "Error", "Informational event" )

 

Output:

 

VahidDM_0-1632463441605.png

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

Thank you, @Greg_Deckler and @VahidDM .

I applied the following and that seems to work:

=CALCULATE(MIN('Table'[Status]) ,ALLEXCEPT('Table', 'Table'[ID]))

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.