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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
SaturnV
Partner - Contributor III
Partner - Contributor III

Using Date formatting in set analysis

I am trying to create a set analysis where my date field "Datum" is equal current YearMonth.

 

Count({<=[Datum.autoCalendar.YearMonth]={"Date(Today(), 'YYYY-MMM')"}>} MyId)

 

 Where:

 

Date(Today(), 'YYYY-MMM')

 

Prints "2021-Juni"

and

 

=[Datum.autoCalendar.YearMonth]

 

Prints "2021-Juni", "2021-Mai", "2021-Apr.", ...

However the Set analysis is always 0

But this:

 

Count({<[Datum.autoCalendar.YearMonth]={'2021-Juni'}>} MyId)

 

Is working perfectly fine.

Maybe it is an issue with the quotation marks. I already tried "" and '' switching around but no change.

Any suggestions?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Count({<=[Datum.autoCalendar.YearMonth] = {"$(=Date(Today(), 'YYYY-MMM'))"}>} MyId)

View solution in original post

2 Replies
sunny_talwar

Try this

Count({<=[Datum.autoCalendar.YearMonth] = {"$(=Date(Today(), 'YYYY-MMM'))"}>} MyId)
SaturnV
Partner - Contributor III
Partner - Contributor III
Author

Thank you very much. This did the trick 🙂