Forum Discussion
Average
- 4 years ago
The reason it's giving this is that you are averaging at the table row granularity. That is, averaging these values:
To fix this, you need to average over the appropriate granularity:
avg = AVERAGEX ( SUMMARIZE ( Peso, Peso[Name], Peso[Review] ), [aux2] )
Thanks for your help AlexisOlson,
Can I bother you with another question?
I have 2 date slicers (one for month and one for year), both single-select.
Since the calculation of "avg" I must do it 12 months back, I adapted the measure as follows (there is a column "Date" that I did not name before)
Table [Date] is linked with Calendar [Date]
avg = CALCULATE(AVERAGEX (SUMMARIZE ( Table, Table[Name], Table[Review],Table[Date] ), [aux2] ),DATESBETWEEN(Calendar[Date],NEXTDAY(SAMEPERIODLASTYEAR(LASTDATE(Calendar[Date]))),LASTDATE(Calendar[Date])))
But doesnt work.
I get, at least in a small sample that I made, the same values as without having made the change to your formula.
Any suggestion?
Thanks you
- AlexisOlson4 years agoSuper User
I can't quite tell what's going on from this description. You may want to create a new post with more detail and, ideally, link to a sample file others can follow along with.