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
Sander_NL
Helper I
Helper I

Check if multiple rows have same value than status OK else NOK in new column

Good evening,

 

I have a table with the following columns/rows and I'm looking for a way to create the new column overall status. I know how to do a check row by row but now I need to check all the rows of one app together. Only when all rows for app Example1 have status 6 the overall status column should show OK and for Example2 you see that a number of values is not 6 and therefore should show NOK. 

 

Sander_NL_0-1660249325540.png

 

 

Thanks in advance for any guidance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Sander_NL ,

Try a new column =

var _cnt = calculate(distinctcount(Table[Status]), filter(table, [app] = earlier([app]) ) )

return

if(_cnt=1, "OK", "NOK")

 

View solution in original post

3 REPLIES 3
Aikeno
Frequent Visitor

Hello,

 

Im a trying to do something very similar but sometimes my dates which are equal to your status in this case are blank and when it is the case I would like to be NOK to.

 

Can you please me help for this case ?

 

Thanks in advance

amitchandak
Super User
Super User

@Sander_NL ,

Try a new column =

var _cnt = calculate(distinctcount(Table[Status]), filter(table, [app] = earlier([app]) ) )

return

if(_cnt=1, "OK", "NOK")

 

Thanks a lot!

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.