Forum Discussion

NickProp28's avatar
NickProp28
Post Partisan
6 years ago
Solved

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