Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
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])

Labels (1)
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)))