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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
cmck
Frequent Visitor

Evaluate values in column B, for each distinct value in column A and return result in column C

Hi, 

 

I am trying to make a new column for my dataset. Below is a basic representation of my data. 

 

In column C (ready to go home) I want to say that if all animals of the same type have been chipped then they are ready to go home. (i.e. for each distinct value in column A, I want to evaluate whether all values in column B = "Yes", if so return "Yes" in column C)

 

In this case, one dog has not been chipped and so dog is not ready to go home. All cats have been chipped and so can be moved home.

 

AnimalChipped?Ready to go home?
DogYesNo
DogYesNo
DogNoNo
CatYesYes
CatYesYes

 

Thanks in advance

1 ACCEPTED SOLUTION
Uspace87
Resolver III
Resolver III

Ready go home = IF(COUNTROWS(FILTER('Table', 'Table'[Animal]= EARLIER('Table'[Animal]) && 'Table'[Chipped] = "Yes")) = COUNTROWS(FILTER('Table', 'Table'[Animal] = EARLIER('Table'[Animal]))), "Yes", "No")

View solution in original post

3 REPLIES 3
Uspace87
Resolver III
Resolver III

Ready go home = IF(COUNTROWS(FILTER('Table', 'Table'[Animal]= EARLIER('Table'[Animal]) && 'Table'[Chipped] = "Yes")) = COUNTROWS(FILTER('Table', 'Table'[Animal] = EARLIER('Table'[Animal]))), "Yes", "No")
cmck
Frequent Visitor

Thank you!!!

 

If I make a new table with the distinct animals in, is there a way I can tidy up the results and just have a single line with yes/no for each animal?

 

AnimalReady to go home
DogNo
CatYes

you can just plot it with animal and the ready to go home column

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors