cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lewdow
Helper I
Helper I

Pulling out table totals to add them together

Data table stucture:

 

Sales table[ADJUSTED_QUANTITY] = volume per product. Each product has a product class associated with it.

ListPrice table[List Price] = list price per product

 

Trying to achieve a calculation of weighted average cost for all products within two particular classes and add those weighted averages together. So far I've created a measure which uses the following DAX:

 

weighted_av_cost = DIVIDE(SUMX(PBI_RAM_PPD, PBI_RAM_PPD[ADJUSTED_QUANTITY] * RELATED('List Prices'[LIST_PRICE])), SUMX(PBI_RAM_PPD, PBI_RAM_PPD[ADJUSTED_QUANTITY]),0)

I've then created two tables with visual level filters (each filtered on different classes) which gives me the total weighted average cost for each class.

Capture.JPG

Next I want to pull out those total weighted averages in order to sum them (as shown above), and then use that summed total to pass through into other calculations (take the price of another product from it showing that the alternative is cheaper, and then multiply the saving by a quantity..). 

 

Any idea how I go about passing these weighted average totals off to be able to use in subsequent calculations?

 

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @lewdow ,

I think it is impossible to calculate between visuals who enabled different visual level filters.
AFAIK, visual level filter effect only works current visual, you can't invoke current visual level filter from other visual side.  It can only get correspond result(based on its filter effect) when you use measure on different visuals.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.