Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jacek_stypulkow
Contributor II
Contributor II

Date format change in set analysis

Hi,

My date field format is set as the below

jacek_stypulkow_0-1678443467360.png

I would like to use the following expression to measure the items in previous month

Sum({<DateField
={'>=$(=AddMonths( MonthStart (Today()),-1))<=$(=AddMonths( MonthEnd (Today()),-1))'}>} Itemscounter).

It does not work due to date format. Can you advice how to correct date format settings or modify the expression. 

Unfortunately the load script can not be changed in this case.

Regards

Jacek 

Labels (2)
1 Solution

Accepted Solutions
Gabbar
Specialist
Specialist

try this:
Sum({<DateField
={">=$(=Date(AddMonths( MonthStart (Today()),-1),'YYYY-MM-DD hh:mm:ss.ffffff'))<=$(=Date(AddMonths( MonthEnd (Today()),-1),'YYYY-MM-DD hh:mm:ss.ffffff'))"}>} Itemscounter)

View solution in original post

2 Replies
Gabbar
Specialist
Specialist

try this:
Sum({<DateField
={">=$(=Date(AddMonths( MonthStart (Today()),-1),'YYYY-MM-DD hh:mm:ss.ffffff'))<=$(=Date(AddMonths( MonthEnd (Today()),-1),'YYYY-MM-DD hh:mm:ss.ffffff'))"}>} Itemscounter)

jacek_stypulkow
Contributor II
Contributor II
Author

Brilliant work!