Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

Help with Addmonths() set analysis

All,

I'm trying to add the Forecast Quantity based on monthly lead time. For example, if an Item has 217 days as order lead time, monthly lead time is 7 and I add the Forecast quantities of the first seven months. My expression works fine when an item is selected, but it does not work and sums up all 12 months when no selections are made. Any help is greatly appreciated!

Below is my expression:

sum({<Forecast_Date = {">=$(=Date(MonthStart(Today(1)))) <$(=Date(addmonths(MonthStart(today(1)),[Monthly Lead Time])))"}>}[Forecast Quantity])

Thanks!

Labels (3)
3 Replies
Highlighted

Re: Help with Addmonths() set analysis

May be you need to do a Max here?

Sum({<Forecast_Date = {">=$(=Date(MonthStart(Today(1)))) <$(=Date(MonthStart(Today(1), Max([Monthly Lead Time]))))"}>} [Forecast Quantity])
Highlighted
Creator
Creator

Re: Help with Addmonths() set analysis

It's not working. It still summing up the quantities of the 12 months.

Highlighted

Re: Help with Addmonths() set analysis

Would you be able to share a sample where we can see the issue?