Forum Discussion
Sum from different tables based on other values
I have some tables with the same information:
Table 1, 2, 3...
Date Country number of sales
At the same time, I have created 2 tables with unique values for Country and Date to relate everything and that´s working fine.
However I would like to have a table with the sum of table 1, 2, 3 for the same date and country.
What is the best way to do that?
Thanks a lot
Hi Gaizka,
Please create a new table by clicking "new table" under Modeling on Home page, type the following DAX.New Table= SUMMARIZE ( UNION ( UNION ( Table1, Table2 ), Table3 ), [Date], [Country], "sum sales", SUM ( [number of sales] ) )
If this still doesn't resolve your issue, please create dummay sample table and list expected result, so that we can share more detailed solution.
Best Regards,
Angelia
2 Replies
- v-huizhn-msft
Microsoft Employee
Hi Gaizka,
Please create a new table by clicking "new table" under Modeling on Home page, type the following DAX.New Table= SUMMARIZE ( UNION ( UNION ( Table1, Table2 ), Table3 ), [Date], [Country], "sum sales", SUM ( [number of sales] ) )
If this still doesn't resolve your issue, please create dummay sample table and list expected result, so that we can share more detailed solution.
Best Regards,
Angelia - v-huizhn-msft
Microsoft Employee
Hi Gaizka,
Have you resolved your issue? If you have, welcome to share your solution or mark the right reply as answer. More people will benefit from here.
Best Regards,
Angelia