Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Afternoon,
I am in need of your alls guidance once again with help for a formula. I have a field MonthConsumed that is a date field, a part number MATNR, and field S031.SPMON that is the total consumed in that month. I am trying to create within a table a formula that would average the last 6 months worth of consumption. Logically it would be S031.SPMON where MonthConsumed = today() and then again for today()-30 for last month etc for 6 months. Can someone help with this formula I cannot seem to get it to work at all.
Have a look at the following Design Blog post, may be of some use to you:
https://community.qlik.com/t5/Qlik-Design-Blog/Average-Which-average/ba-p/1466654
If you want to search further in this area, use the following link:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
You may actually need the following Set Analysis post, there are a couple other related links at the bottom of this post too:
https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822
Regards,
Brett
Can you try this?
Avg(If(MonthConsumed>=AddMonths(Today(),-6), S031.SPMON))
I appreciate the help. Unfortunately it didnt work .
May need to attach a sample app on this one, as there has to be something we are missing in the details I believe, likely only way to get more responses.
Regards,
Brett