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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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.