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

Issue with set analysis expression

Hi,

Can someone please tell me what is wrong with the below statement

=sum({$<CrimeYear = {$(vCrimeYear) - 1}, CrimeMonth = {"<=$(vCrimeMonth)"}>} Casenum )

Actually I have used the below expression for Current YTD

=sum({$<CrimeYear = {$(vCrimeYear)}, CrimeMonth = {"<=$(vCrimeMonth)"}>} Casenum )

I wanted to have a Previous YTD so that I wondered if I could simply substract the year by one..$(vCrimeYear) - 1 but its not working. I am sure I am making a syntax mistake so I will appreciate if someone could correct my expression

Regards

Arif

1 Reply
Nicole-Smith

=sum({$<CrimeYear = {$(=$(vCrimeYear) - 1)}, CrimeMonth = {"<=$(vCrimeMonth)"}>} Casenum )