Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Date Selection with No Current Selection Made

juan_escobar
Contributor II

Date Selection with No Current Selection Made

Hello,

I have this script that I was using with some date fields inside my model, was great because I can have a selection as usual or when I don't have any selection the value is going to be the max month of the max year.

My model is in spanish, so in your data the date should be:

- Month as Mes

- Year as Año

=If((IsNull(GetFieldSelections(Mes))),(if(Max(Año)=Year(Today()),(Month(Date(Today(),'MMM'))),(Date(Date#(Max(Mes),'MM'),'MMM')))),Date(Date#(Max(Mes),'MM'),'MMM'))

Also I have formatted the month field because the DB gave me the data as string.

Any comments, suggestions or reviews I'll be glad to hear them!

Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎02-24-2012 10:55 AM
Updated by: