Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Solved! Go to Solution.
@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"}))
@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"}))
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
https://docs.microsoft.com/en-us/dax/containsstring-function-dax
https://docs.microsoft.com/en-us/dax/search-function-dax
https://docs.microsoft.com/en-us/dax/find-function-dax
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |