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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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