Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

1ST OF THE MONTH ISSUE

I have a Year and a Month.  I do have data in the data set for the whole year.  But the requirements is that if it is 1st of the month The month filter will only display the months prior to the current month.  For Example if today is Dec 1st,  the month filter will show  the months,

Jan, Feb, Mar............Nov else it will show the months up to today

1 Solution

Accepted Solutions
sunny_talwar

May be this:

If(Day(Today()) = 1 and Max(TOTAL Year) = Year(Today()), If(Month < Month(Today()), Month), Month)

View solution in original post

5 Replies
sunny_talwar

May be like this

If(Day(Today()) = 1, If(Month < Month(Today()), Month), Month)

Not applicable
Author

Thanx for the quick response, it works, but one more thing, I Have data for previous years also, so I want to do the above only for current Year, for previous years I still want to see all the months.

FOr example, today is Dec 01,2016 so when I select 2016 the Months available should be Jan thru Nov, but for Years 2015 and 2014 I should see all months

sunny_talwar

May be this:

If(Day(Max(TOTAL Date)) = 1, If(Month < Month(Max(TOTAL Date)), Month), Month)

Not applicable
Author

NO doesn't work cuz my date field is just Year and MOnth ;YYYYMM', Any more ideas.

sunny_talwar

May be this:

If(Day(Today()) = 1 and Max(TOTAL Year) = Year(Today()), If(Month < Month(Today()), Month), Month)