I am building an OLAP table and I would like to calculate the average value over the past 6 months. With the 6 month time frame changing as time go on.
CASE WHEN ROUND_MONTH(ADD_MONTHS(“CASES”.“PostingDate”, -6)) THEN TRIMMED_MEAN(“CASES”.“Value(EUR)”, 5, 5) ELSE NULL END
I have tried various options of the above and cant get it to work. Can you please help?