Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DAX

HI, I have a requirement where I have to check for each category, and if for that category any flag is "Yes', then I need another column which says "True" for all values of that category. eg. ` Colu...
  • dax's avatar
    dax
    6 years ago

    Hi Anonymous , 

    You could change amitchandak 's expression like below, it is calculated column

    Column = if(isblank(countx(filter('Table', [Column1] = earlier([Column1]) && [Flag] ="Yes"),[Column1])),"False", "True")

    Or you also could try to use measure to achieve this.

    Measure = if(CALCULATE(DISTINCTCOUNT('Table'[Flag]),ALLEXCEPT('Table','Table'[Column1]))>1,"True", "False")

     

    Best Regards,
    Zoe Zhi

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