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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
srikant
Frequent Visitor

How to change outcome of all the rows with same value based on one row outcome

I want to create a column changes the outcome of all the rows with the same value based on the outcome of one of the values. Example if 123 occurs 3 times once with the value "pass" then with value "on the edge" third time with the value "fail" then all three occurrences should be made "fail".

The priority should be

1)fail

2)on the edge

Please help its urgent. Thank you

3)passpowerbi comm.PNG

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Assuming there can only be Pass, Fail and Over the Edge in the Individual result column, write this calculated column formula

=if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Individual result]="fail"))>0,"Fail",if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Individual result]="on the edge"))>0,"On the Edge","Pass"))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Assuming there can only be Pass, Fail and Over the Edge in the Individual result column, write this calculated column formula

=if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Individual result]="fail"))>0,"Fail",if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Individual result]="on the edge"))>0,"On the Edge","Pass"))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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