The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
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 |
Solved! Go to Solution.
You could try this:
Measure = DIVIDE( SUMX( Table1; Table1[Num] * Table1[Den]); SUM(Table1[Den]) )
@ovetteabejuela well according to your calculation its coming up with the correct value. What are you trying to do?
Proud to be a Super User!
I want to achieve highlighted in yellow
asd = sorry about the field name but it is just Num * Den (23.42 * 4479 = 104898.2)
@ovetteabejuela are you not wanting this?
measure = divide(sum(num)/countrows(table of denominator))
Proud to be a Super User!
That is just like straight average, I'm doing some kind of reverse calculation here to get the correct average:
You could try this:
Measure = DIVIDE( SUMX( Table1; Table1[Num] * Table1[Den]); SUM(Table1[Den]) )
Thanks @vanessafvg and @sdjensen,
So that's what I should be using SUMX! I'll read about that to understand the equation more.
@ovetteabejuela so then why not just calculate(divide(sum(num),sum(den))
Proud to be a Super User!
Sorry the field names are misleading... here, how about this:
User | Count |
---|---|
160 | |
110 | |
96 | |
86 | |
75 |
User | Count |
---|---|
157 | |
137 | |
132 | |
81 | |
61 |