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
AlexanderPrime
Solution Supplier
Solution Supplier

Search for text value in column based on another Column

Hi all. Got a case of the Mondays it seems.

 

I'm trying to get a calculated column in that returns if any row within an ID group has a specific value, to return an answer for the entire ID Group.

 

For example, source data

ID Value
1 A
1 B
1 A
2 A
2 A
3 B
3 B
3 B

 

Expected outcome: 

ID Value Expected Outcome
1 A Yes
1 B Yes
1 A Yes
2 A No
2 A No
3 B Yes
3 B Yes
3 B Yes

So if any row within ID group 1 has a B value at any point, then the new column will show Yes for all ID 1 rows. Otherwise return a No value for all.

Expecting something simple but the brain hasn't woken up fully it seems!


Please note - I am not affiliated with Microsoft, I'm just an end user like yourself.
Just a regular guy doin' Data Science.

If my post has helped you, please don't forget to thumbs up or click "Accept as solution" if it solved your problem!
1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

Please try the below.

 

Status = 
var _count = CALCULATE(COUNTROWS('Table'),FILTER(ALLEXCEPT('Table','Table'[ID]),'Table'[Value] = "B"))

return IF(_count>0,"Yes","No")

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1676896697716.png

 

Even the most fundamental Excel worksheet formula is enough to solve it,

CNENFRNL_1-1676896804363.png

 

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

miTutorials
Super User
Super User

Please try the below.

 

Status = 
var _count = CALCULATE(COUNTROWS('Table'),FILTER(ALLEXCEPT('Table','Table'[ID]),'Table'[Value] = "B"))

return IF(_count>0,"Yes","No")

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.