Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello All,
I want to create a calculated table using 2 existing tables in Power BI.
1st table:
| name | percentage | date |
| a | 20% | 01-10-2021 |
| b | 30% | 01-10-2021 |
| c | 40% | 01-10-2021 |
| d | 10% | 01-10-2021 |
2nd table:
| category | amount | date |
| one | 500 | 01-10-2021 |
| two | 1000 | 01-10-2021 |
| three | 1500 | 01-10-2021 |
Output:
| name | cat | amount | date |
| a | one | 100 | 01-10-2021 |
| b | one | 150 | 01-10-2021 |
| c | one | 200 | 01-10-2021 |
| d | one | 50 | 01-10-2021 |
| a | two | 200 | 01-10-2021 |
| b | two | 300 | 01-10-2021 |
| c | two | 400 | 01-10-2021 |
| d | two | 100 | 01-10-2021 |
| a | three | 300 | 01-10-2021 |
| b | three | 450 | 01-10-2021 |
| c | three | 600 | 01-10-2021 |
| d | three | 150 | 01-10-2021 |
I want the "amount" from the 2nd table to be distributed using the "percentage" column in the 1st table. Please help. Thanks in advance.
Solved! Go to Solution.
Hi @Devesh,
I created a sample pbix file(see attachment), please check whether that is what you want. First, Please create the relationship for Table1 and Table2 base on date fields...
Create relationship base on date fields
1. If you want to get a summarized table, you can create a calculated table with following DAX formula:
Output =
SUMMARIZECOLUMNS (
'Table1'[name],
'Table2'[category],
'Table1'[date],
"amount", SUM ( 'Table1'[percentage] ) * SUM ( 'Table2'[amount] )
)
2. If you just want to display as a table visual, you can simply create a measure as below.
NAmount = SUM('Table1'[percentage])*SUM('Table2'[amount])
Best Regards
Yes, they are related on date column. As we add data for next month, it should be filtered by date column.
Hi @Devesh,
I created a sample pbix file(see attachment), please check whether that is what you want. First, Please create the relationship for Table1 and Table2 base on date fields...
Create relationship base on date fields
1. If you want to get a summarized table, you can create a calculated table with following DAX formula:
Output =
SUMMARIZECOLUMNS (
'Table1'[name],
'Table2'[category],
'Table1'[date],
"amount", SUM ( 'Table1'[percentage] ) * SUM ( 'Table2'[amount] )
)
2. If you just want to display as a table visual, you can simply create a measure as below.
NAmount = SUM('Table1'[percentage])*SUM('Table2'[amount])
Best Regards
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 64 | |
| 31 | |
| 26 | |
| 26 |