Rolling 30-Day Average
Hi all,
We're trying to create a rolling 30-day average in one of our bar chart widgets. I've tried using different solutions found online, but they all involve RPAVG, CURRENTDATE or other window functions that seem to break our connection to the live model or throw an unexpected token. An example we found was the following:
Â
Â
Â
Â
Â
Â
from which we got the 'not supported by Live Model' error.Â
I've also tried repeatedly adding together ( [Total Value] , PREV( [Days in Date] , n)) from n=1 to 30, but this seems to overwhelm the widget and break connection with the model (though it works in theory, I did get it to work with smaller n, such as 5)
Any help would be greatly appreciated.
turtleData123
Posted 1 year ago·Last reply 1 year ago
6 comments
DRay
·1 year agoI would reach out to support. They can look into why it's not working with the Live Model.
turtleData123
OP1 year agoOK, thanks for the reply
turtleData123
OP1 year agoHey DRay, following up in case this issue comes up in the future - I got back from support the following:
We're sorry for any inconvenience, but the following function is no longer officially documented or supported. It was deprecated some time ago, but it hasn't been removed from the product yet. Thank you for your understanding.
I did make a forum post to suggest adding a new version of these RP functions over at Product Feedback. Thanks again for the help
turtleData123
OP1 year agoAdditionally - I can confirm the following works with the elasticube:
RPSUM([Total GROUPEXTNETREVENUEAMT], 30) / 30
however when I take it to a live model, it breaks the connection with our model, throwing an unknown error
Â
DRay
·1 year agoHi turtleData123,
Thank you for reaching out. RPAVG should work with Live Models as of 2023.11. What version are you on?
turtleData123
OP1 year agoWe're on version 2024.3. I'm testing the RPAVG with an elasticube currently, and it's giving incorrect values (checked using excel). I've uploaded an image of the widget's configuration page, each formula is visible as the title of the respecting value, for reference. Additionally, we need the average to run through the first days as well, which this doesn't seem to do - it begins with the [ first day value ] / 1, and iterates