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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
eeew00
Helper I
Helper I

Easiest way to multiply values from columns in different tables?

Hello and greetings from a total amateur, spare time BI:ier,

 

My scenario:

 

I have numeric values in Col1a which is in in Table1 and Col1b which is in table2. I would like to multiply them with each other on a row-base (So that I can see the result on each row in matrix visual and a grand total)

 

At first I tried SUMX * SUMX which gave a nice result on each row, except for the grand total which was horribly wrong.

Later I tried SUMX(col1a * col1b) but that only seems to work when the columns are on the same table..

 

There's a billion posts online on how to do this properly, but I can't for the life of me understand the answers with 4-5 nested DAX functions.. 
I would like to do it via DAX and not PowerQuery. 

 

Any help would be greatly appreciated.

 

BR,

Eelis

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@eeew00 
The logic of total of Sumx()*Sumx() is sum(col1) multiply sum(col2), it does not sum the multiply product.

 

I would suggest you to create a calculate column. Check my example:

I don't know how is your data looks like but I guess the two tables are related with each others by two columns. If not, you can also add an index column to each table, then create a 1:1 relationship. 

 

Column = 'Table'[Value]*RELATED('Table (2)'[Value])

 

col1xcol2.JPG

pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/paul_qiuyunus_onmicrosoft_com/EbhhtLGxfD9BuwGOxHGW...

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@eeew00 
The logic of total of Sumx()*Sumx() is sum(col1) multiply sum(col2), it does not sum the multiply product.

 

I would suggest you to create a calculate column. Check my example:

I don't know how is your data looks like but I guess the two tables are related with each others by two columns. If not, you can also add an index column to each table, then create a 1:1 relationship. 

 

Column = 'Table'[Value]*RELATED('Table (2)'[Value])

 

col1xcol2.JPG

pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/paul_qiuyunus_onmicrosoft_com/EbhhtLGxfD9BuwGOxHGW...

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you! That did the trick 🙂

Pragati11
Super User
Super User

HI @eeew00 ,

 

Did you try the solution mentioned on the following existing threads?

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Multiply-columns-row-by-row-from-two-differen...

https://community.powerbi.com/t5/Desktop/Multiply-2-columns-from-2-different-tables/m-p/722762

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

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

Appreciate your Kudos!!

Proud to be a Super User!!

Thanks! Unfortunately the example with SELECTEDVALUE leaves the totals field blank, and the other example with SUMX * SUMX gives an incorrect total

Hi @eeew00 ,

 

In that case I will some sample data from both of your tables and some screenshot of the output.

If you can share pbix file that will be better.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

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

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.