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! Request now

Reply
markhay
Frequent Visitor

Volume query with measures (dividing filtered value by total value)

I'm attempting to complete some price volume mix analysis and have been given a set of calculations but I'm now stuck when trying to divide a measure which will be filtered by rows by the total value of the column. The values I'm using are measures and would be displayed in a matrix with Dates as columns and Item Types as rows.

 

The plain text calculation would be:

Quantity - ((QuantityLY/TotalQuantityLY) * TotalQuantity)

 

In the scenario of 1 type of item sales the values would be as below (in a step order)

31498 – ((34087/ 1254085) * 1229307)

31498- (0.0271807732330743 * 1229307)

31498 - 33,413.51480083087

-1,915.51480083087

 

Any sense checks would be appreciated. 

1 ACCEPTED SOLUTION
markhay
Frequent Visitor

Resolved - 

[QuantityM] - (([QuantityLY]/CALCULATE([QuantityLY],ALLSELECTED()))*CALCULATE([QuantityM],ALLSELECTED()))

View solution in original post

5 REPLIES 5
markhay
Frequent Visitor

Resolved - 

[QuantityM] - (([QuantityLY]/CALCULATE([QuantityLY],ALLSELECTED()))*CALCULATE([QuantityM],ALLSELECTED()))
DataNinja777
Super User
Super User

Hi @markhay 

 

I am curious why QuantityLY is being substituted by two different numbers in your example.  Do you mean, the first QuantityLY is QuantityCY instead?  

DataNinja777_0-1719314335774.png

Best regards,

 

Good spot - fat fingers. Should have read as: Quantity - ((QuantityLY/TotalQuantityLY) * TotalQuantity)

QuantityLY meaning quantity last year?

Yes - the middle part aims to work out the proportion of that items sales against all sales.

i.e. what % of sales quantity was attributed to that item last year and then multiplying by current year total volume would show what sale volumes would have been expected if proportions remained the same. 

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.