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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
knightwriter
Creator III
Creator III

Date = Month

Hi All,

Im trying to create a list box for two years previous by month rather than the dates. The expression works below but when I add Month (highlighted in red) it doesnt work.

Any suggestions?

=If(YearStart(Today(),-2)<=YearStart([Car Sales.Date]),Month[Car Sales.Date],)

Thanks

Labels (1)
1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

Are you putting ()? Because it seems like you are missing parenthesis.

=If(YearStart(Today(),-2)<=YearStart([Car Sales.Date]),Month([Car Sales.Date]),)

View solution in original post

2 Replies
sinanozdemir
Specialist III
Specialist III

Are you putting ()? Because it seems like you are missing parenthesis.

=If(YearStart(Today(),-2)<=YearStart([Car Sales.Date]),Month([Car Sales.Date]),)

knightwriter
Creator III
Creator III
Author

Answer by own query but FYI. Use MonthName rather than Month and it works.

=If(YearStart(Today(),-2)<=YearStart([Car Sales.Date]),MonthName[Car Sales.Date],)