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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
fushiosu
New Member

total spent measure question

Hey everyone, I'm trying to get this measure which is supposed to be the total value in money spent

the first table is the number of units bought, and the second, the price of the units bought. Both tables have date columns and there are multiple lines per month (hence the SUM) for example, the total spent that's coming out of that measure is 37530 (10.4+10.45)*(1000+800)

however, I'd like totalSpent to be: (10.4 x 1000)+(10.45 x 800) = 18760

aaa.pngunknown (6).png

1 ACCEPTED SOLUTION
ray_ux
Memorable Member
Memorable Member

@fushiosu 

Try this.

New Measure = SUMX('Product', 'Product'[Price] * RELATED('Inventory'[Quantity])) (edited)
 
there are similar threads, you might want to take a look at. https://community.powerbi.com/t5/Desktop/Pricing-Table/td-p/1938605

View solution in original post

1 REPLY 1
ray_ux
Memorable Member
Memorable Member

@fushiosu 

Try this.

New Measure = SUMX('Product', 'Product'[Price] * RELATED('Inventory'[Quantity])) (edited)
 
there are similar threads, you might want to take a look at. https://community.powerbi.com/t5/Desktop/Pricing-Table/td-p/1938605

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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