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

Issue with Variable in Set Analysis

Hi,

I have the below variable defined:

DY= $[Year] (current selection of the Year)

Set Analysis:

Sum({$< [DIVERSITY DEFINITION]={'SMALL BUSINESS'}, [DIVERSITY YEAR]={$(DY)}>}[Line Amount])

The outcome seems to not work at all. Any help will be much appreciated.

Thank you!

3 Replies
shraddha_g
Partner - Master III
Partner - Master III

Try:

DY= getcurrentfieldselection(Year)

Set Analysis:

Sum({$< [DIVERSITY DEFINITION]={'SMALL BUSINESS'}, [DIVERSITY YEAR]={'$(DY)'}>}[Line Amount])

stabben23
Partner - Master
Partner - Master

Hi,

try this without variable.

Sum({$< [DIVERSITY DEFINITION]={'SMALL BUSINESS'}, [DIVERSITY YEAR]={$(=max(Year)) }>}[Line Amount])

sunny_talwar

May be this:

Sum({$< [DIVERSITY DEFINITION]={'SMALL BUSINESS'}, [DIVERSITY YEAR]={$(=DY)}>}[Line Amount])