Forum Discussion
ovetteabejuela
Impactful Individual
9 years agoDAX Simple Math | Not Averaging or Aggregating Properly or it is just me?
Hi COmmunity, Why is this not doing average: Num Den Column1 23.42 4479 A 24.36 5230 B 23.31 3823 C 23.81 5577 D 23.88 3948 E 23.87 5846 F
- 9 years ago
You could try this:
Measure = DIVIDE( SUMX( Table1; Table1[Num] * Table1[Den]); SUM(Table1[Den]) )
vanessafvg
Community Champion
9 years agoovetteabejuela
Impactful Individual
9 years agoThat is just like straight average, I'm doing some kind of reverse calculation here to get the correct average:
- sdjensen9 years ago
Solution Sage
You could try this:
Measure = DIVIDE( SUMX( Table1; Table1[Num] * Table1[Den]); SUM(Table1[Den]) )
- ovetteabejuela9 years ago
Impactful Individual
Thanks vanessafvg and sdjensen,
So that's what I should be using SUMX! I'll read about that to understand the equation more.
- vanessafvg9 years ago
Community Champion
ovetteabejuela so then why not just calculate(divide(sum(num),sum(den))
- ovetteabejuela9 years ago
Impactful Individual
Sorry the field names are misleading... here, how about this: