

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis with Variables
I am trying to figure out this set analysis and I cannot get it to work. Basically I am trying to count a set of distinct values if they fall in the past 7 days and if their status is delivered:
count(distinct {<CalendarDate = {'>=$(=$(vSevenDaysAgo))'}, Status = {'DELIVERED'}>} OrderNumber)
This works by itself:
count(distinct {<Status = {'DELIVERED'}>} OrderNumber)
But when I add in the date it comes up with Zero.
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For some weird reason I got it working by replacing the single quotes with double quotes..
count(distinct {<CalendarDate = {">=$(=vSevenDaysAgo)"}, Status = {'DELIVERED'}>} OrderNumber)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
count(distinct {<CalendarDate = {'>=$(=vSevenDaysAgo)'}, Status = {'DELIVERED'}>} OrderNumber)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That still gives me 0 and it should be showing 30.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share sample data or .qvw file?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, unfortunately I can not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For some weird reason I got it working by replacing the single quotes with double quotes..
count(distinct {<CalendarDate = {">=$(=vSevenDaysAgo)"}, Status = {'DELIVERED'}>} OrderNumber)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@anseglko wrote:For some stupid reason I got it working by replacing the single quotes with double quotes..
count(distinct {<CalendarDate = {">=$(=vSevenDaysAgo)"}, Status = {'DELIVERED'}>} OrderNumber)
It has a strong reason.
With new qlik engine,
single quotes are used only for exact match in comparison
double quotes are used for search expression
Check this: Quotes in Set Analysis

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay! Thank you for the info


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This did not work either. It might be because we are on a different version of Qlik Sense. What version are you running? I'm going to download the latest version onto my desktop and see if I can get this to work. Otherwise I'll do some fun stuff on the load to get it to work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm running April 2019

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