Forum Discussion

k3rz0rg's avatar
k3rz0rg
Icon for Advocate III rankAdvocate III
4 years ago
Solved

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: If Title is AAA and BBB and CCC (all 3 or 4 or more matches) th...
  • Anonymous's avatar
    Anonymous
    4 years ago

    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")

    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.