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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
erhardt_dekock
Contributor III
Contributor III

Compare Previous selection to Current selection

Hi All

I want to know if it is possible to compare the number of selections made to the previous number of selections?

Example:

Say I have 4 products that all sold in the following months and weeks:

ProductMonthWeek
a35
b35
c36
d48

Then I start off by selecting Week 5 and 6 (GetSelectedCount(Week) = 2, call it preSelect) which gives Product a, b and c.

Then I select Product a or b, which results in Week 6 being deselected and (GetSelectedCount(Week) = 1, call it nowSelect)

My question: Is there a way to compare preSelect and nowSelect. I want to inform the user that his date range selection has changed.

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe something like this boolean comparison, returning false when the distinct count differs between selections

=Count({$1} DISTINCT Week) = Count({$} DISTINCT Week)

where $1 is the set identifier of the previous selection state

View solution in original post

1 Reply
swuehl
MVP
MVP

Maybe something like this boolean comparison, returning false when the distinct count differs between selections

=Count({$1} DISTINCT Week) = Count({$} DISTINCT Week)

where $1 is the set identifier of the previous selection state