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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mhorsfall
Contributor II
Contributor II

Set Expressions with Dates

I am struggling with some date ranges in my dashboard. Trying to get values for a 12-month period starting with the previous month. When I use the expression:

Sum({<[calendar.full_date] = {">9/30/2022 <10/1/2023"}>} (([Amount2]/100))) I get the values I am looking for, but when I use:

Sum({<[calendar.full_date] = {">Date(MonthEnd(AddMonths(Today(), -13))) <Date(MonthStart(Today()))"}>(([Amount2]/100))) the output is just 0.

Would appreciate any insight. I have already checked and changed the data type in my data load for calendar.full_date field by using:

Date(calendar.full_date) AS calendar.full_date

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

Hi, try

{">$(=Date(MonthEnd(AddMonths(Today(), -13)))) <$(=Date(MonthStart(Today())))"}

View solution in original post

2 Replies
BrunPierre
Partner - Master II
Partner - Master II

Hi, try

{">$(=Date(MonthEnd(AddMonths(Today(), -13)))) <$(=Date(MonthStart(Today())))"}

mhorsfall
Contributor II
Contributor II
Author

That did it! Thank you!