Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Devesh
Frequent Visitor

Create Summarize table with DAX

Hello All,

 

I want to create a calculated table using 2 existing tables in Power BI.
1st table:

namepercentagedate
a20%01-10-2021
b30%01-10-2021
c40%01-10-2021
d10%01-10-2021

 

2nd table:

categoryamountdate
one50001-10-2021
two100001-10-2021
three150001-10-2021

 

Output:

namecatamountdate
aone10001-10-2021
bone15001-10-2021
cone20001-10-2021
done5001-10-2021
atwo20001-10-2021
btwo30001-10-2021
ctwo40001-10-2021
dtwo10001-10-2021
athree30001-10-2021
bthree45001-10-2021
cthree60001-10-2021
dthree15001-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.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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 fieldsCreate 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] )
)

yingyinr_4-1641366071145.png

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]) 

yingyinr_2-1641365640918.png

Best Regards

View solution in original post

3 REPLIES 3
bcdobbs
Community Champion
Community Champion

In the data you give everything has the same date.

In your real data are the two table related on date column?

 

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Yes, they are related on date column. As we add data for next month, it should be filtered by date column.

Anonymous
Not applicable

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 fieldsCreate 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] )
)

yingyinr_4-1641366071145.png

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]) 

yingyinr_2-1641365640918.png

Best Regards

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.