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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
mtrussardi
Frequent Visitor

Multiply two columns from different table with condition

Hello everyone!

 

I have one column titled ('Unit Cost') from the table named ('Raw Materials') and another column titled ('Rate') from the table ('Exchange Rates'). I would need to mulitply the column 'Unit Cost' times the column 'Rate' when the date is the same for the two tables. How could I do this?

 

Thanks in advance for your time.

 

Please, let me know.

4 REPLIES 4
amitchandak
Super User
Super User

@mtrussardi , you can use min/max , but aggregation is must

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@mtrussardi , Create a common date table and then create a measure like

 

sumx(values(Date[date]), Sum(Table1[Unit Cost]) * sum(Table2[Rate]))

 

you can use min/max, average in place of sum

 

refer the concept here: https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

 

Thank you for your reply.

 

I tried the measure but the problem is that I don't want to calculate the sum. I just need to calculate the value of 'Unit Cost' times the "Rate' for each row when the date is the same.

Any developments?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.