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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
k3rz0rg
Advocate III
Advocate III

Need help with DAX condition.

Hi everyone,

 

I have a table with a title column and I needed a YES or NO return if all the conditions matches.

For example:

k3rz0rg_0-1655320475090.png

If Title is AAA and BBB and CCC (all 3 or 4 or more matches) then only return Yes, if not then NO (any 1 missmatch will return NO).

Could you please tell me how to do this with DAX? Custom Column or Measure anything? I tried with IF with AND function but no avail, maybe I was doing something wrong!

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @k3rz0rg ,

Please refer to my obix file to see if it helps you.

Create a measure.

Measure = VAR _COUNTTITLE= CALCULATE(DISTINCTCOUNT('Table'[Title]),FILTER(ALL('Table'),'Table'[ID]=SELECTEDVALUE('Table'[ID])))
RETURN 
IF(_COUNTTITLE>=3,"YES","NO")

Or a column.

column = VAR _COUNTTITLE= CALCULATE(DISTINCTCOUNT('Table'[Title]),FILTER(('Table'),'Table'[ID]=EARLIER('Table'[ID])))
RETURN 
IF(_COUNTTITLE>=3,"YES","NO")

vpollymsft_0-1655708516453.png

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @k3rz0rg ,

Please refer to my obix file to see if it helps you.

Create a measure.

Measure = VAR _COUNTTITLE= CALCULATE(DISTINCTCOUNT('Table'[Title]),FILTER(ALL('Table'),'Table'[ID]=SELECTEDVALUE('Table'[ID])))
RETURN 
IF(_COUNTTITLE>=3,"YES","NO")

Or a column.

column = VAR _COUNTTITLE= CALCULATE(DISTINCTCOUNT('Table'[Title]),FILTER(('Table'),'Table'[ID]=EARLIER('Table'[ID])))
RETURN 
IF(_COUNTTITLE>=3,"YES","NO")

vpollymsft_0-1655708516453.png

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@k3rz0rg , Try a new column like

 

new column =
var _1 = countx(filter(Table, Table[Title] = earlier(Table[Title]) && Table[Done] = "No") , Table[Title])
return
if(isblank(_1), "No", "Yes")

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors