Forum Discussion
poweruser124
3 years agoNew Member
Weighted Average by Distinct Category
Hello PBI Community, I'm fairly new to DAX and am trying to write a DAX formula to calculated weighted average by distinct category as follows: The table structure is this: Row ID (Key)__...
- 3 years ago
poweruser124 , Try a measure like
Var _tab= Summarize(Table,[Total Sample],Table[Average Size within Sample])
return
divide(Sumx(_tab, [Total Sample] * Table[Average Size within Sample]), Sumx(_tab, [Total Sample]))
poweruser124
3 years agoNew Member
Thank you amitchandak , this worked. Much appreciated!