Forum Discussion

freginier's avatar
freginier
Solution Sage
4 years ago
Solved

Dax text comparaison

Hi all I need your help !   I have a table like below, I need to comparaire value from category A with values from category A.1 and A.2 I need a new column with flag "same" or "different".   How...
  • Royel's avatar
    4 years ago

    Load your data into the power bi desktop

    Now create the flowing calculated column 
    Status =
    VAR val = data[Value]
    VAR result =
    CALCULATE ( COUNTROWS ( data ), ALL ( data ), data[Value] = val )
    RETURN
    IF ( result == 1, "different", "Same" )

    You will get your expected results.