Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinRamsey
Creator
Creator

Formula Help Needed

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. 

 

 

 

 

5 Replies
JustinRamsey
Creator
Creator
Author

Capture.PNG

Brett_Bleess
Former Employee
Former Employee

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

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Saravanan_Desingh

Can you try this?

Avg(If(MonthConsumed>=AddMonths(Today(),-6), S031.SPMON))

 

JustinRamsey
Creator
Creator
Author

I appreciate the help. Unfortunately it didnt work .

Brett_Bleess
Former Employee
Former Employee

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

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.