Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
rajkumarb
Creator II
Creator II

Month Selection

Hi all

my current  max date is 17-aug-2017

if i dont make any selection in month field, then it should default to last full completed month
in my case that is june 2017
else if i make a selection in the month field means then it should be the selected month

below is the if condition I am using but its not working

please suggest.

=IF(len(GetFieldSelections([Calendar Month]) )=0, MONTHEND(AddMonths(today(-1), -1)),[Calendar Month])

11 Replies
rajkumarb
Creator II
Creator II
Author

Capture.PNG

sunny_talwar

Is Jan, Feb, Mar.... your calendar Month field? What is the date field my friend? Did you expect Jun to convert to a date by itself? Use this

Date(If(GetSelectedCount([Calendar Month]) = 0, (MonthStart(Today()) - 1), Max(DateFieldHere)))

View solution in original post