Notifications
Clear all
90 day running average
General
2
Posts
2
Users
0
Reactions
360
Views
Topic starter
09/08/2024 9:36 am
Hi, How do you calculate a 90 day running average starting from the previous day (and recalculated for every day of a day dimension)?
Quote
26/08/2024 2:06 pm
hi Pierre,
I would do it this way but feel free to modify my idea:
- I will create a parallel hierarchy for dates which will have suffix _AVG90 (Example: 2024-08-26_AVG90)
- Go to Integrator and add two variables type groovy (today ${Today}: return new Date().format("yyyy-MM-dd") and 90 days prior ${Today-90} return (new Date()-90).format("yyyy-MM-dd"))
- Create an extract from the desired cube and make filtering on dates accept.inAlphaRange [${Today - 90},${Today}]
- Make sure you include empty cells so avg can be more accurate. These empty cells will be presented as null which you can replace by zeros in Groovy Function by just writing "return _input1" and check Null Default.
- Create a Table aggregation where input will be your day as a constant value ${Today}-AVG90 (meaning you would like to write a value to this cell)
- In Measure choose #Value and make sure aggregation is AVG.
- Write this back to the cell and schedule the job to run every day after midnight.
Tadaaaa
ReplyQuote
Forum Information
- 7 Forums
- 21 Topics
- 56 Posts
- 0 Online
- 98 Members
Our newest member: Mazrlcm
Latest Post: Report Usage metrics
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed
Join the Jedox4Beginners forum and engage with a community of passionate Jedox users. Get expert advice, share insights, and find solutions to your Jedox-related queries. Unlock the power of collaboration and accelerate your learning journey in the world of Jedox.