Forum Discussion
konwes97
3 years agoFrequent Visitor
Creating weighted statistics in DAX
Hi guys, Unfortunately i dont have idea how to resolve my problem. So i have 2 tables: IDA Group A 1 B 1 B 2 B 2 B 2 C 3 The second one: IDA Counts A 2 ...
- 3 years ago
Hi konwes97
Here's some DAX that works for your example data:
Weighted = VAR _Numerator = SUMX('Groups Table', DIVIDE(1, RELATED('Counts Table'[Counts]))) VAR _Denominator = COUNTROWS(ALL('Counts Table')) VAR _Result = DIVIDE(_Numerator, _Denominator) RETURN _ResultThe tables have a relationship like this:
PaulOlding
Solution Sage
3 years agoHi konwes97
Here's some DAX that works for your example data:
Weighted =
VAR _Numerator =
SUMX('Groups Table', DIVIDE(1, RELATED('Counts Table'[Counts])))
VAR _Denominator = COUNTROWS(ALL('Counts Table'))
VAR _Result = DIVIDE(_Numerator, _Denominator)
RETURN
_Result
The tables have a relationship like this: