Forum Discussion
Alessandra
Helper I
8 years agoCalculate weighted distribution in a matrix
Hi everyone, I'm trying to calculate how many products are in each bussiness by brand and manufacturer, I already have the denominator of the weighted distribution, which is: CALCULATE(SUM(...
- 8 years ago
Hi Alessandra,
Based on my test, the formula below should work in your scenario. :smileyhappy:
Measure = var businessIDs = DISTINCT(Hoja1[BusinessID]) return CALCULATE(SUM(Hoja1[SalesVolume]),FILTER(ALL(Hoja1),CONTAINS(businessIDs,[BusinessID],Hoja1[BusinessID])))
Here is the sample pbix file for your reference.
Regards
v-ljerr-msft
Microsoft Employee
8 years agoHi Alessandra,
Based on my test, the formula below should work in your scenario. :smileyhappy:
Measure = var businessIDs = DISTINCT(Hoja1[BusinessID]) return CALCULATE(SUM(Hoja1[SalesVolume]),FILTER(ALL(Hoja1),CONTAINS(businessIDs,[BusinessID],Hoja1[BusinessID])))
Here is the sample pbix file for your reference.
Regards
Alessandra
Helper I
8 years agoThank you so much ! It's just what I needed :D