Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zhaohaifeng
Contributor III
Contributor III

Getselectedount() issue with if filter

Hi All,

Now we faced the challenge that, if we set if in the filter , than getselectedcount function not works, always show 0 value. Sample as below,

For example we want to judge the count for field Choosemonth,

if we just put Choosemonth in the filter then the Getselectedcount(Choosemonth) works fine,

if we put if in the filter, for example if(ChooseMonth='2017_Sep',ChooseMonth), then if we selected from filter, getselectedcount(Choosemoth) not works. So we cant use if for getselectedcount() function? Any ideas? Thanks.

Best Regards,

Haifeng

14 Replies
zhaohaifeng
Contributor III
Contributor III
Author

Hi KC,

What i mean was that if we use another field to judge, for example if(I_TIME_KEY 〉vA,Aggr(Choosemonth,Choosemonth)),  then if we select from filter, then both I_TIME_KEY and Choosemonth will select, not only choosemonth. Can you help to check my Qfv sample test2? Thanks again Man!

Best Regards,

Haifeng

zhaohaifeng
Contributor III
Contributor III
Author

Hi KC,

I mean the highlight in red part will also selected once select filter, how can we dont selecte I_TIME_KEY in selection bar. Thanks.

ChooseMonth.PNG

Best Regards,

Haifeng

jyothish8807
Master II
Master II

Hi Haifeng,

Please try this:

=Aggr(only({<I_Time_Key={'>$(v_Daily_MonthBegin_lastyear)<$(v_Daily_MonthBegin)'}>}ChooseMonth),ChooseMonth)

Br,

KC

Best Regards,
KC
zhaohaifeng
Contributor III
Contributor III
Author

Works! Thanks very much KC!

Best Regards,

Haifeng

jyothish8807
Master II
Master II

You are welcome

Best Regards,
KC