Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Future Months Range

I was trying to create Future months range and i was using an If condition to create and seems like it's not working. Requirement is to create a Next 3, 6, 9, 12 months range which includes the present month in the range. Can anyone give me some insight please as to which path should i take to create this?

Example if i want to look at the 3 Month range  in that case it would April, May, June.

6 Replies
Not applicable
Author

Hello,
you should load one more table that will consist from two fields: MonthID - link to month and Range- your range field.
Script will be like this one:

RangeTable:

load distinct

   Month,

   '3M' as Range

Resident Data
where Month>=Num(Month(today())) and Month<=num(month(today())+2)

concatenate (RangeTable)

load distinct

   Month,

   '3M' as Range

Resident Data
Month>=Num(Month(today())) and Month<=num(month(today())+5)

and so on.

Not applicable
Author

Thanks for the response it doesn't work

exactly with the requirement that i would need . I am also wondering is there any other options that are possible to create this? can anyone advise on this please?

Not applicable
Author

Hi Dinesh,

Could you please upload book1 excel file?

Not applicable
Author

PFA for the source file.

Not applicable
Author

can someone advise on this please?

tresesco
MVP
MVP

Your sample qvw seems working. If you select 3M, you get 4,5,6 in months; if you select 6M you get 4-9. This should be the way. If not, please explain a bit more how you want.