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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - applying filters to result set

Hi All,

I'm having trouble with my set analysis expression.  I was able to get the following to work, which limits my data to the previous years' data for the selected date range.

Sum({1<TRADE_DATE_T = {'>=$(=num(AddYears(min({$} TRADE_DATE_T),-1))) <=$(=num(AddYears(max({$} TRADE_DATE_T),-1)))'}>} [TOTAL])

Now I need it to be limited by the user filter SECTOR as well.  I tried something like this, but it didn't work

Sum({1<SECTOR = P({1<TRADE_DATE_T = {'>=$(=num(AddYears(min({$} TRADE_DATE_T),-1))) <=$(=num(AddYears(max({$} TRADE_DATE_T),-1)))'}>} SECTOR), SECTOR = {$(=Only(SECTOR))}>} [TOTAL])

Thanks,

Victor

1 Reply
deepakk
Partner - Specialist III
Partner - Specialist III

hi

Can you attach some sample data. To solve such kind of a problem we need to understand the flow of data.

Deepak