I need to compare for each Vendor the amount of PO’s of last week to the average number of PO’s per week of the 12 weeks before (from today -2 until -13). I’m only not totally sure on how I can solve this issue?
I use this formula for the amount of PO’s of last week.
(CASE WHEN ROUND_WEEK(“EKKO”.“TS_AEDAT”) = ADD_DAYS(ROUND_WEEK(TODAY()),-7) THEN 1.0 ELSE 0.0 END)=1.0)
And tried using Moving Average for the average over multiple weeks, but I’m not getting this solved in a way which would provide me with just 1 average.
Table need to look like this:
Vendor PO’s last week Average # PO’s per week over the earlier 12 weeks
XYZ 8 3,2
Thanks in advance for any help on this topic.