Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

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
Highlighted
Contributor III
Contributor III

Re: Formula Help Needed

Capture.PNG

Highlighted
Digital Support
Digital Support

Re: Formula Help Needed

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.
Highlighted
Specialist III
Specialist III

Re: Formula Help Needed

Can you try this?

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

 

Highlighted
Contributor III
Contributor III

Re: Formula Help Needed

I appreciate the help. Unfortunately it didnt work .

Highlighted
Digital Support
Digital Support

Re: Formula Help Needed

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.