
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis - Last 90 Days
I'm attempting to use Set Analysis in Qlik Sense to filter a date range based on the last 90 days. Using the expression below does not seem to have any effect. I've tried various combinations, but just can't get anything to work. The dimension in this scenario is Interaction Start Date Local.
=Avg({$<[Interaction Start Date Local]=${">=today()-90"}>}Duration)
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you be able to share the same image like above with this expression
=Avg({$<[Interaction Start Date Local] = {">=$(=Date(Today()-90, 'M/D/YYYY'))"}>} Duration)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Josh,
your syntax does not seem to be correct.
Try the following:
Avg({$<[Interaction Start Date Local]={">=$(=Today()-90)"}>}Duration)
Marc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about this?
=Avg({$<[Interaction Start Date Local]=${">=$(=Date(Today()-90))"}>} Duration)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the tip, but no matter how I modify this expression Qlik basically ignores the parameter for date range (-30, -60, etc.). I'm at loss on how to make this work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Josh,
make sure you don't have any selections made on the date field in the set analysis expression. Otherwise it won't work. To avoid this you can add the following to you set analysis.
Avg({$<[Interaction Start Date Local]={">=$(=Today()-90)"},[Interaction Start Date Local]=>}Duration)
The extra addition for the Interaction Start Date Local is to make sure the selections on this field are ignored.
Marc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you making in another date and time related field? such as Month?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And what is the format of you date? It might be that you have to convert it to a date. When using expressions like Today()-30 it converts the date to a number. When you date field is not a number it won't work.
Try this in stead.
Avg({$<[Interaction Start Date Local]={">=$(=Date(Today()-90))"}, [Interaction Start Date Local]=>}Duration)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the data load it's defined as SET DateFormat='M/D/YYYY';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you making selection in another date related field?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny - I am not making a selection on another date field.

- « Previous Replies
-
- 1
- 2
- Next Replies »