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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis possible for date by Dimension?

Is it possible to use set analysis with a date range that varies by dimension?  I'm doing a report on campaign response and the user wants to be able to adjust the response window after the campaign start date.  I have input fields that write to variables, which are embedded in other variables to add the input field values to the campaign start date (vMinResponseDate = [Campaign Start Date]+vMinResponseWindow). 

I put that calculated date variable in the chart to verify it's returning the correct date, but when i try to use that calculated date variable in the set analysis of the expression to count the responses:

Count({< [Interaction Date] = {'>$(date(vMinResponseDate))<= $(date(vMaxResponseDate))'}>} ADDR_ID) it's not returning the right result.


The way i have it configured in the attached doc, it's currently returning a value that's roughly double the accurate count.

Is there another approach i should use, or a change i can make to the expression that would make it work right?

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The set is calculated at the chart level, not at the Campaign level like you need. You can use an if-statement instead. Count( If( [Interaction Date] >$(vMinResponseDate) and [Interaction Date]  <= $(vMaxResponseDate), ADDR_ID)).


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The set is calculated at the chart level, not at the Campaign level like you need. You can use an if-statement instead. Count( If( [Interaction Date] >$(vMinResponseDate) and [Interaction Date]  <= $(vMaxResponseDate), ADDR_ID)).


talk is cheap, supply exceeds demand