Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
For some weird reason I got it working by replacing the single quotes with double quotes..
count(distinct {<CalendarDate = {">=$(=vSevenDaysAgo)"}, Status = {'DELIVERED'}>} OrderNumber)
Try this
count(distinct {<CalendarDate = {'>=$(=vSevenDaysAgo)'}, Status = {'DELIVERED'}>} OrderNumber)
That still gives me 0 and it should be showing 30.
Can you share sample data or .qvw file?
No, unfortunately I can not.
For some weird reason I got it working by replacing the single quotes with double quotes..
count(distinct {<CalendarDate = {">=$(=vSevenDaysAgo)"}, Status = {'DELIVERED'}>} OrderNumber)
@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
Okay! Thank you for the info
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.
I'm running April 2019