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: 
Anonymous
Not applicable

Date Field In Set Analysis

I'm trying to use set analysis for showing values of 7 days minus the selected date but it shows the results same as for the current date:

=sum({<Cal.Date={'=$(vWkStrt)'}>}MKT_INDX)

where,

vWkStrt = Cal.Date-7

Also, I tried putting Cal.Date-7 in set analysis, did not work.

In the text object when I display vWkStrt, it shows me a number value, if I do Date(vWkStrt) then I see Cal.Date in MM/DD/YYY format.

Is there something wrong with the syntax or the date formating ?

1 Solution

Accepted Solutions
shree909
Partner - Specialist II
Partner - Specialist II

Hi change the variable syntax to the ca. date format

try this

vWkStrt =Date( Cal.Date-7,'MM/DD/YYYY')

the variable value must always match the fieldvalue date(cal.Date) then only set analysis work

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Probably the formatting. Try =sum({<Cal.Date={'$(=date($(vWkStrt)))'}>}MKT_INDX)


talk is cheap, supply exceeds demand
shree909
Partner - Specialist II
Partner - Specialist II

Hi change the variable syntax to the ca. date format

try this

vWkStrt =Date( Cal.Date-7,'MM/DD/YYYY')

the variable value must always match the fieldvalue date(cal.Date) then only set analysis work

Anonymous
Not applicable
Author

Thank you both, those were very helpful replies.