Forum Discussion
Moving average over non-numeric values
- 9 years ago
In this scenario, since you need to get the distinct count of event on each day and calculate average, I suggest you summarize a new table to with distict count calculated group on day level.
Daily Events= SUMMARIZE ( Table, Table[Date], "Daily Distinct Count Events", CALCULATE ( DISTINCTCOUNT ( Table[Events] ), ALLEXCEPT ( Table, Table[Date] ) ) )Then you can calculate the moving average based on above calculated table.
Regards,
In this scenario, since you need to get the distinct count of event on each day and calculate average, I suggest you summarize a new table to with distict count calculated group on day level.
Daily Events=
SUMMARIZE (
Table,
Table[Date],
"Daily Distinct Count Events", CALCULATE ( DISTINCTCOUNT ( Table[Events] ), ALLEXCEPT ( Table, Table[Date] ) )
)
Then you can calculate the moving average based on above calculated table.
Regards,
- jlum9 years agoFrequent Visitor
I was hoping there was a way to calculate the moving average without creating a new table.
I ended up doing what you suggested.
Thanks.
- hema_cherupalli8 years agoNew Member
Hi v-sihou-msft
I also bumped into the same issue of calculating the "Moving average over non-numeric values"
And tried your solution but getting the following error:
"The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
I wonder what does this actually mean?Any help is much appreciated.
Thanks