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

How to convert a Slider calendar object to Date List Boxes

Hello all,

We have a current QlikView application that has a date calendar object slider on it. It has been requested to remove the slider and replace it with selectable date list boxes (Year, Quarter, Month). I'm fairly new to QlikView and have been trying all sorts of things to replace the slider and haven't come up with a solution that gives the same results.

I have created the master calendar script and added the Year, Quarter, Month list boxes just fine.

Note: In my calendar script I have both the month as a string in the form of "Jan" and as a Month Number in the form of "1", as well as a MonthYear in the form of "Jan2011".

We have a straight table with a single calculated dimension (and a few expressions for the other columns), but the calculated dimension is what I need to change to work correctly.

The calculated dimension is:

=if((LossRunMthYear < (Date(MakeDate(Year(AddMonths(vTodaysDate,1)), Month(AddMonths(vTodaysDate,1)), 1), 'MMM YYYY'))) and (LossRunMthYear >= (Date(MakeDate(Year(AddMonths(vTodaysDate,-11)), Month(AddMonths(vTodaysDate, -11)), 1), 'MMM YYYY'))), State)

"LossRunMthYear" is in the form of Jan2011

"vTodaysDate" is a date in the form of 41436

The calculated dimension is basically converting the numeric date to the form of MMM YYY (Which I'm sure can be deduced from the calculated dimension) and then adding/subtracting months to get a date range.

The slider changes the "vTodaysDate" variable based on the month/year chosen by the user in the slider.

I am trying to figure out how to get the same results using the date list boxes somehow. I have tried all sorts of things including using triggers on the selection boexes to update the "vTodaysDate" variable (this didn't seem to work)

I tried using a variable "vSetvTodaysDate" with a value of vTodaysDate=MakeDate(Year, MonthNumber, 1) and changing the calculated dimension to:

=if((LossRunMthYear < (Date(MakeDate(Year(AddMonths(vSetvTodaysDate,1)), Month(AddMonths(vSetvTodaysDate,1)), 1), 'MMM YYYY'))) and (LossRunMthYear >= (Date(MakeDate(Year(AddMonths(vSetvTodaysDate,-11)), Month(AddMonths(vSetvTodaysDate, -11)), 1), 'MMM YYYY'))), State)

(this didn't work either).

I then tried changing the calculated dimension to:

=if((LossRunMthYear < (Date(MakeDate(Year(AddMonths(MakeDate(Year, MonthNumber, 1),1)), Month(AddMonths(MakeDate(Year, MonthNumber, 1),1)), 1), 'MMM YYYY'))) and (LossRunMthYear >= (Date(MakeDate(Year(AddMonths(MakeDate(Year, MonthNumber, 1),-11)), Month(AddMonths(MakeDate(Year, MonthNumber, 1), -11)), 1), 'MMM YYYY'))), State)

(this didn't work either).

I tried dabbling with some set analysis putting the Aggr() function around it and that just gave an Error in the straight table.

I have been trying all sorts of combinations of searches in the ClikCommunity and through startpage.com and have come up empty.

I am hoping the QlikView guru's here might be able to point me in the right direction of how to do this.

TIA

0 Replies