Forum Discussion
freginier
Solution Sage
4 years agoDax 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 can I do this ?
| Category | Value |
| A | ABC |
| A.1 | A |
| A.2 | ABC |
| A.2 | DEF |
| A.3 | ABC |
| A.4 | DEF |
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.
13 Replies
- Royel
Super User
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.