Forum Discussion
JaweedL
1 year agoHelper I
Nested iF in Dax
Hi all I am a simple expression to write, yet I am having a lot of trouble to translate in DAX, I must be doing someting consistently wrong. I seek your valuable help. Many thanks. If [Region] ...
- 1 year ago
Hello JaweedL ,
You can use Switch Function to simplify your If code in DAX, please try the below code..
Result =
SWITCH (
TRUE(),
AND ( OR ( [Region] = "NewYork", [Region] = "Louisana" ), [salesAmount] > [Target] ), 0,
AND ( NOT ( OR ( [Region] = "NewYork", [Region] = "Louisana" ) ), [salesAmount] < [Target] ), 0,[value])If you find this helpful , please mark it as solution and Your Kudos/Likes are much appreciated!
Thank You
Dharmendar S
JaweedL
1 year agoHelper I
Thank you Dharmendar. It works, but I have difficulties to understand te code.