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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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")

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
Aikeno
Helper I
Helper I

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")

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi,

 

This is very useful, thank you.

The first line works fine for me, but when I try the return and if, i get a syntax error. As soon as I type return it redlines.

var _cnt = calculate(distinctcount('Active Agreements'[Difference]), filter('Active Agreements', [Agreement Number] = earlier([Agreement Number]) ) ) return




Thanks a lot!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.