Forum Discussion
velvetine_123
2 years agoFrequent Visitor
creating DAX table with multiple tables' summarize
Hi,
I would like to create a summarize table that basically summarize info from two tables.
For example :
Table A
| Date | Sale |
| 1/1/2024 | 10 |
| 1/1/2024 | 20 |
| 2/1/2024 | 30 |
Table B
| Date | Cost |
| 1/1/2024 | 5 |
| 1/1/2024 | 10 |
| 2/1/2024 | 15 |
Date table
1/1/2024 |
| 2/1/2024 |
| 3/1/2024 |
| 4/1/2024 |
so obviously table A and table B are not directly connected but are connected to the same Date table. I'm looking to create a summarize table as below :
Summarized table :
| Date ( from date table ) | Sale (from table A) | Cost (from table B) |
| 1/1/2024 | 30 | 15 |
| 2/1/2024 | 30 | 15 |
hello velvetine_123
please check if this accomodate your need.
Summarize =
SUMMARIZE(
'Date',
'Date'[Date],
"Sale Tbl A",
SUM('Table A'[Sale]),
"Cost Tbl B",
SUM('Table B'[Cost])
)Hope this will help you.
Thank you.
4 Replies
- Jihwan_KimSuper User
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new table.
SUMMARIZECOLUMNS function (DAX) - DAX | Microsoft Learn
expected result table = SUMMARIZECOLUMNS ( 'Date'[Date], "Sales", SUM ( 'Table A'[Sale] ), "Cost", SUM ( 'Table B'[Cost] ) ) - IrwanSuper User
hello velvetine_123
please check if this accomodate your need.
Summarize =
SUMMARIZE(
'Date',
'Date'[Date],
"Sale Tbl A",
SUM('Table A'[Sale]),
"Cost Tbl B",
SUM('Table B'[Cost])
)Hope this will help you.
Thank you.
- velvetine_123Frequent Visitor
thank you so much this is what i'm looking for !
- IrwanSuper User