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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Salauat
Regular Visitor

DAX: Total price from two tables

Hello, I have two tables.

In first table I have multiple Man.Model repeated N times.

In second table I also have Man.Model, but repeated once.

 

Product table:

  • Device name
  • Manufacturer model
  • Date expire

 

Unit Price table:

  • Manufacturer model
  • Unit Price

I am trying to create New Measure, which will be counting Total Price = Product[Count_of Man.Model] * Unit Price[Unit Price]

I have placed simple Table visual in my report with filter by Date expire and I need above Measure to be recalculated every time, when filter changes

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Salauat , if there is one to many relation then you can try like

Total Price =sum( Product[Count_of Man.Model] )* maxx(Product, related(Unit Price[Unit Price]))

 

 

else refer these ways to copy value from one table to another : https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Salauat , if there is one to many relation then you can try like

Total Price =sum( Product[Count_of Man.Model] )* maxx(Product, related(Unit Price[Unit Price]))

 

 

else refer these ways to copy value from one table to another : https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Seems the formula you provided is not calculating the total correctly.

It multiplies Count * Unit_Price, but the overall rows total is not correct, it's way too huge

Hello @amitchandak !

Thank you, the correct formula that worked for me is below:

 

Total = SUM(Product[Count_of Man.Model] )* counta(Product, related(Unit Price[Unit Price]))

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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