Forum Discussion
Weighted average responding to slicers
- 7 years ago
Give this a try for your Weight measure.
Weight = DIVIDE ( [SumProduct], CALCULATE ( [SumProduct], ALLSELECTED ( Sheet1[DSO] ) ) )
I put a copy of my testing file up for you to take a look at. It also uses SUMX instead of a calculated column to get SumProduct.
https://www.dropbox.com/s/xmm25c0ahs58cxk/Weighted%20Avg%20DSO.pbix?dl=0
Hey,
this articel provides an introduction into ALLSELECTED https://dax.guide/allselected/
As you can see it removes the implicit filter if you change the slicer for this reason all rows show the same value for Total of SumProduct (a measure), but this does not affect the calculation of the column Weight.
For this it's necessary that all calculations (except SumProduct) have to be measures as the are dependent on the slicer selection.
Unfortunately I can't use the filestore you choose, if you need more assistance please upload the pbix to onedrive or dropbox.
Regards,
Tom