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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
liam_hanninen
Creator
Creator

Translating to set analysis

If I want to only see sales from Canada I would do this in set analysis:

sum({<Country={'Canada'}>} Sales)

similarly (but not ideally) I could do;

if (Country='Canada', Sales)

Now if I only want to see sales from this last year (YTD) I might do:

if( min(%Date)>(today()-365), Sales)

What is the set analysis equivalent of this?

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be something like this:

Sum({<%Date={"$(='>=' & Date(Today() - 365, 'DateFieldFormatHere'))"}>} Sales)

Also look here:

Dates in Set Analysis

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

May be something like this:

Sum({<%Date={"$(='>=' & Date(Today() - 365, 'DateFieldFormatHere'))"}>} Sales)

Also look here:

Dates in Set Analysis

liam_hanninen
Creator
Creator
Author

Yes great, thanks. And thanks for the link.

maxgro
MVP
MVP

sum({$ <Date={">=$(=AddYears(Today(),-1))<=$(=Today())"}>} Sales)