Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Challenge with Date Range in Set Analysis

I've been trying all day to implement what I thought would be a simple date range in a set analysis example. I have a data island for Date selection. The selection will be used to summarize the previous 90 days of sales.

Example (not working):

sum({$<[_Date]={">=($(=SelectDate)-90) <=$(=SelectDate)"} >} NetSales)

I have been able to get it working by hard-coding the lower value:

sum({$<[_Date]={">=04/01/2018 <=$(=SelectDate)"} >} NetSales)

I'm sure my problem is simple and I'm not seeing it. Appreciate the assistance.

1 Solution

Accepted Solutions
Highlighted
Creator II
Creator II

Re: Challenge with Date Range in Set Analysis

Perhaps something like this?


sum({$<[_Date]={">=$(=Date($(SelectDate)-90)) <=$(=SelectDate)"} >} NetSales)

View solution in original post

4 Replies
Highlighted
Creator II
Creator II

Re: Challenge with Date Range in Set Analysis

Perhaps something like this?


sum({$<[_Date]={">=$(=Date($(SelectDate)-90)) <=$(=SelectDate)"} >} NetSales)

View solution in original post

Highlighted
MVP
MVP

Re: Challenge with Date Range in Set Analysis

Try this

=sum({$<[_Date]={">=$(=Date(SelectDate - 90,'DD/MM/YYYY'))<=$(=SelectDate)"} >} NetSales)

Highlighted
Contributor
Contributor

Re: Challenge with Date Range in Set Analysis

Thanks Manish but this ends up filtering out ALL records resulting in $0.

Highlighted
Contributor
Contributor

Re: Challenge with Date Range in Set Analysis

This one worked! Thanks William!