Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to calculate a year to date average . Below is an example of calculation that I would like to put in a graph without selecting period.
I put this formula for YTD average :
RangeAvg(above(Avg ({<PERIOD = {">=1/1/2019<=01/01/2025"}>} PROD),0,12) )
it works until 01/12/2019 but after that I have a rolling average over 12 months. How can I do to have a real ytd ?
Thank you for your help.
I answer myself, because I found!
Thanks for the help..
I added 2 new columns , I split PERIOD into YEAR and YEAR_MONTH. And I used the aggr function to group by by year and year_month.
aggr(RangeAvg( above( Avg ( PROD),0,12) ),YEAR,YEAR_MONTH)
No ideas ?
Why does the calculation work with a table and with a graph the result is different?
I put the same formula
I just want to perform a rolling average over the year.
This formula : RangeAvg(above(Avg ({<PERIOD = {">=1/1/2019<=01/01/2025"}>} PROD),0,12) )
I answer myself, because I found!
Thanks for the help..
I added 2 new columns , I split PERIOD into YEAR and YEAR_MONTH. And I used the aggr function to group by by year and year_month.
aggr(RangeAvg( above( Avg ( PROD),0,12) ),YEAR,YEAR_MONTH)