Question
Calculate Euro value but only for the past 6 months (moving date)
Hi Community,
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?
Thanks,
Anna
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
I am using your formula for euro value (6 month) column and the below formula for the trimmed value.
TRIMMED_MEAN(CASES.Value(EUR), 5, 5)
Both are displaying the same results. I would anticipate that if i choose a posting date that is outside the past 6 months, then the formula you have suggested, would produce a zero value. Since we only want to calculate the value within the past 6 months of todays calendar date.
Please let me know.
Hope youre staying healthy.
Cheers,
Anna