Forum Discussion
Anonymous
3 years agoNot applicable
Summarizing within a VAR expression
Hi all, I'm struggling to find the answer, so hopefully someone here can help me. I feel like it's an easy fix within DAX for a trained eye. π This is an example set I had. Store Matrix...
- 3 years ago
Anonymous
Measure = VAR numerator = CALCULATE ( SUMX ( ALL ( 'table'[Store] ), CALCULATE ( SUM ( 'table'[Average Revenue] ), ALLEXCEPT ( 'table', 'table'[Store], 'table'[Matrixcode] ) ) ) ) VAR denominator = CALCULATE ( DISTINCTCOUNT ( 'table'[Store] ), ALLEXCEPT ( 'table', 'table'[Matrixcode] ) ) RETURN DIVIDE ( numerator, denominator )
tamerj1
Community Champion
3 years agoHi Anonymous
please try
Matrixcode average =
AVERAGEX (
CALCULATETABLE (
'Table',
ALLEXCEPT ( 'Table', 'Table'[Store], 'Table'[Matrixcode] )
),
[Average Revenue]
)
Anonymous
3 years agoNot applicable
Thank you for replying!
This unfortunately did not succeed, it resulted in similar results.