Forum Discussion
Anonymous
6 years agoNot applicable
Running Average in a Matrix Visualization
I've looked at several rolling average posts, but none of them seem to fit my situation and data. Let's say I have this in a table: Client WeekEndDate Charges Client A 4/4/2020 123 C...
- Anonymous6 years ago
I have solved it. Looks like instead of filter(all()) I should have been using DATESINPERIOD. Thus:
AverageCharges14Days =
calculate(
sum('Table1'[Charges]),
DATESINPERIOD('Table1'[WeekEndDate],LASTDATE('Table1'[WeekEndDate]),14,DAY)
)/14This gave me the output I was looking for.
Anonymous
6 years agoNot applicable
I have solved it. Looks like instead of filter(all()) I should have been using DATESINPERIOD. Thus:
AverageCharges14Days =
calculate(
sum('Table1'[Charges]),
DATESINPERIOD('Table1'[WeekEndDate],LASTDATE('Table1'[WeekEndDate]),14,DAY)
)/14
This gave me the output I was looking for.