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 - ignores filters on list box

I have an expression in a text object, like below:

=num

(sum({$<PeriodCounter={">$(#=max(PeriodCounter-3))<=$(#=max(PeriodCounter)-2)"}, YearMonthNum=,Year=>}SickTime*+1)

/

sum({$<PeriodCounter={">$(#=max(PeriodCounter-3))<=$(#=max(PeriodCounter)-2)"}, YearMonthNum=,Year=>}WorkTime)+1

, '# ##0,0%')

And when I do a selection in a list box for YearMonthNum I don't wont the expression to affect to expression.

I have try to include the field "YearMonthNum=" in the expression and also change $ to 1 but it does't work.

If I exlude the filter with PeriodCounter it works.


Any suggestions?   

1 Solution

Accepted Solutions
sunny_talwar

May be you needed it within the inner Max() function as well. Try this:

=Num

(Sum({$<PeriodCounter={">$(#=max({<YearMonthNum, Year>}PeriodCounter-3))<=$(#=max({<YearMonthNum, Year>}PeriodCounter)-2)"},YearMonthNum=,Year=>}SickTime*+1)

/

sum({$<PeriodCounter={">$(#=max({<YearMonthNum, Year>}PeriodCounter-3))<=$(#=max({<YearMonthNum, Year>}PeriodCounter)-2)"}, YearMonthNum=,Year=>}WorkTime)+1

, '# ##0,0%')

View solution in original post

2 Replies
sunny_talwar

May be you needed it within the inner Max() function as well. Try this:

=Num

(Sum({$<PeriodCounter={">$(#=max({<YearMonthNum, Year>}PeriodCounter-3))<=$(#=max({<YearMonthNum, Year>}PeriodCounter)-2)"},YearMonthNum=,Year=>}SickTime*+1)

/

sum({$<PeriodCounter={">$(#=max({<YearMonthNum, Year>}PeriodCounter-3))<=$(#=max({<YearMonthNum, Year>}PeriodCounter)-2)"}, YearMonthNum=,Year=>}WorkTime)+1

, '# ##0,0%')

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try addding it to the max functions too:

=num

(sum({$< PeriodCounter={">$(#=max({<YearMonthNum=,Year=>}PeriodCounter-3))<=$(#=max({< YearMonthNum>}PeriodCounter)-2)"},YearMonthNum=,Year=>}SickTime*+1)

/

sum({$<PeriodCounter={">$(#=max({<YearMonthNum,Year=>}PeriodCounter-3))<=$(#=max({<YearMonthNum,Year=>}PeriodCounter)-2)"}, YearMonthNum=,Year=>}WorkTime)+1

, '# ##0,0%')


talk is cheap, supply exceeds demand