Forum Discussion
Anonymous
4 years agoNot applicable
How to sum two thing
Hello expoerts, I want from example belllow to tell me the dax code that calculate: - the amount orginated from Chaina and imported from Chaina and called the direct & amount that orginated from ...
- 4 years ago
Hello:
Please find report for you. I hope you mark as solution.
https://drive.google.com/file/d/1P8HqbFn_JnOfwBK8k2LxwmafGbMdhfTk/view?usp=sharing
- Anonymous4 years ago
Hi Anonymous ,
Here are the steps you can follow:
1. Use Enter data to create a table.
2. Create measure.
direct country = CALCULATE(SUM('Table'[Amount ]),FILTER(ALL('Table'),'Table'[Country of Origin ]="China"&&'Table'[Country of Import ]="China"))undirect countries = CALCULATE(SUM('Table'[Amount ]),FILTER(ALL('Table'),'Table'[Country of Origin ]="China"&&'Table'[Country of Import ]<>"China"))Measure = SWITCH( TRUE(), MAX('Table2'[Group])="direct country",[direct country], MAX('Table2'[Group])="undirect countries",[undirect countries])3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
daXtreme
Solution Sage
4 years agoAn example of such calculations please.
- Anonymous4 years agoNot applicable
Country of Origin Country of Import Amount China China 34 China UAE 3445 China UAE 5676 China China 6768 China UAE 342 China KSA 132 China UAE 323 Turkey UAE 234 China Russia 4545 China India 76 @dtxtreme