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

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

Help excluding dates

I have a data set that only goes back 70 days. I need to put an expression that only shows the last 2 months so 60ish days. 

Sum({<Date={"$(v0WeeksAgo7D)"},$(vOmitSelection_Date)>}$(vMeasureCurrency))

This is my current expression which shows 7D but need to extend to 60 days and exclude anything after this date. I have a date field as my dimension and vmeasurecurrency as my measure. We use set vmeasures that are predetermined so I struggle with creating new expressions, cheers. 

Any help appreciated. 

 

Labels (2)
1 Solution

Accepted Solutions
p_verkooijen
Partner - Specialist II
Partner - Specialist II

@Cameron94  try this


Dates selection fixed to all dates since 70 days based on Today's date

  • Sum({<Date={"=>$(=DATE(Today()-70))"},$(vOmitSelection_Date)>}$(vMeasureCurrency))

Dates selection, dates between max date and 70 days before

  • Sum({<Date={"=>$(=DATE(MAX(Date)-70))<=$(=DATE(MAX(Date)))"} ,$(vOmitSelection_Date)>}$(vMeasureCurrency))

 

You can easily test with an expression that results in the desired date in the frontend in a measure or text object to see the results.

=DATE(Today()-70))

Also you can see the expression result and if it's correct within the expression editor

p_verkooijen_0-1729780109041.png

 

View solution in original post

2 Replies
p_verkooijen
Partner - Specialist II
Partner - Specialist II

@Cameron94  try this


Dates selection fixed to all dates since 70 days based on Today's date

  • Sum({<Date={"=>$(=DATE(Today()-70))"},$(vOmitSelection_Date)>}$(vMeasureCurrency))

Dates selection, dates between max date and 70 days before

  • Sum({<Date={"=>$(=DATE(MAX(Date)-70))<=$(=DATE(MAX(Date)))"} ,$(vOmitSelection_Date)>}$(vMeasureCurrency))

 

You can easily test with an expression that results in the desired date in the frontend in a measure or text object to see the results.

=DATE(Today()-70))

Also you can see the expression result and if it's correct within the expression editor

p_verkooijen_0-1729780109041.png

 

Cameron94
Partner - Contributor III
Partner - Contributor III
Author

Thanks a lot with a slight tweak for my report this worked perfectly!