Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
lets say I have 04 months Jan to Apr
I want to use average of First 03 months as Dimension in order to compare it with April in a chart.
Best Regards,
can you please post the sample data with expected output?
Will something like this help:
sum({<Mon={'Jan','Feb','Mar'}>}metric)/3
sum({<Mon={'Apr'}>}metric)
There's a wealth of material covering this topic here. Did you try searching and researching for yourself?
You will need a calendar - search for master calendar
You will need to make sure you have proper date values
And you can also look here
Calculating rolling n-period totals, averages or other aggregations
Hi Khyam Aslam,
For use an expression as dimension, you have to use Aggr function:
Aggr(Avg({$<MonthYear = {'>=$(vPrev3Months)<=$(vActMonth)'}>} metric),dimension)
vPrev3Months => MonthName(Addmonths(Max(Date)-3))
vActMonth => MonthName(Addmonths(Max(Date)-1))
Kind regards.