Forum Discussion
Average granularity
- 1 year ago
Hi Dicken ,
May I ask if the provided solution helped in resolving the issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you!!
Hi
First, you don't need SUMX for this. Just go for regular SUM. Use SUMX if you want a calculation that SUM doesn't suport like Total Price = SUMX ( tbl, tbl[units] * tbl[unit sales price] )
Tunits:=SUMX(Table1,Table1[Units])
AVERAGEX may not be producing the expected result because it iterates through all visible distinct MMM-YYYY values. The number of unique values could be less than, equal to, or greater than 12. Additionally, your DIVIDE measure uses a constant value of 12. It's important to note that AVERAGEX will exclude any MMM-YYYY that lacks a value. For instance, if Apr-2025 has no value, the average will be computed based only on the remaining months. So, even if 12 months are currently visible, the actual calculation will be based on 11.