Forum Discussion
sathish_kumar1
6 years agoFrequent Visitor
Multiple IF statement DAX
Hi guys, I need to Assign values "Test -1" For values between 2500 to 3499, "Test -2 for values between 3500 to 4999" and "Test -3" for values above 5000. I used a dax expression Test = IF(AND(...
- 6 years ago
Are you creating a custom column ? If yes try this code:
IF('Table (3)'[Sale]>=2500 && 'Table (3)'[Sale] <= 3499; "Test-1"; IF('Table (3)'[Sale] >= 3500 && 'Table (3)'[Sale] <= 4999; "Test-2"; IF('Table (3)'[Sale] >= 5000; "Test-3";BLANK())))Ricardo
camargos88
6 years agoCommunity Champion
Are you creating a custom column ? If yes try this code:
IF('Table (3)'[Sale]>=2500 && 'Table (3)'[Sale] <= 3499; "Test-1"; IF('Table (3)'[Sale] >= 3500 && 'Table (3)'[Sale] <= 4999; "Test-2"; IF('Table (3)'[Sale] >= 5000; "Test-3";BLANK())))
Ricardo
- sathish_kumar16 years agoFrequent Visitor
Hi camargos88 ,
No i am creating a measure and assigning the test values. I cannot create a custom column because i am using Direct Query.
The query you shared is working. Thanks