Forum Discussion
Need Help with DAX Statement
Hi experts,
Good day,
I new to DAX, hoping someone can help me on conditional code.
Based on the table,
The first condition is, I only want get the data (Profit) which Origin/Dest is under MYKUL,MYPEN,CNSHA,SGSIN. Other from this, data(Profit) will ignore.
Second condition , if Original=Dest. Data will be ignore too (Example like CNSHA=CNSHA).
Hope you will have a great day!
Best thanks.
NickProp28 , something like this
calculate(sum(table[profit]), filter(Table, table[origin]<>table[destination] && table[origin] in {"MYKUL","MYPEN","CNSHA","SGSIN"}
&& table[destination] in {"MYKUL","MYPEN","CNSHA","SGSIN"}))
3 Replies
- amitchandakSuper User
NickProp28 , something like this
calculate(sum(table[profit]), filter(Table, table[origin]<>table[destination] && table[origin] in {"MYKUL","MYPEN","CNSHA","SGSIN"}
&& table[destination] in {"MYKUL","MYPEN","CNSHA","SGSIN"}))- NickProp28Post Partisan
Dear amitchandak,
Thanks for your quick response. I have one more question, if i wound like to use LIKE statement. (LIKE 'SG%','MY%' in sql)
In this case, how the code would like be?
Best regards