Forum Discussion
Train23
1 year agoFrequent Visitor
DAX Help
Hello I need some help with the following DAX Syntax. I have a Measure [total qty] and need to get some DAX to do the following: If [total qty] < 1000, Then Divide[total qty] by 1. If [total...
- 1 year ago
You can use the SWITCH function to avoid multiple IF statements - i.e
Your Measure = SWITCH(TRUE(), [total qty] < 1000, Divide([total qty], 1), [total qty] < 5000 Divide([total qty], 2), [total qty] < 50000, Divide([total qty], 4), [total qty] > 50000, Divide([total qty], 6) )
vicky_
1 year agoSuper User
You can use the SWITCH function to avoid multiple IF statements - i.e
Your Measure = SWITCH(TRUE(),
[total qty] < 1000, Divide([total qty], 1),
[total qty] < 5000 Divide([total qty], 2),
[total qty] < 50000, Divide([total qty], 4),
[total qty] > 50000, Divide([total qty], 6)
)
- Train231 year agoFrequent Visitor
Vicki, you ROCK thank you so very much, this WORKS. I have spent the last 2 days trying to get it working. THANK YOU for being part of this great community.