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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
zhaohaifeng
Contributor III
Contributor III

GetSelectedCount()/GetFieldSelections() for If statements

Hi All,

Now we used filter pane(Named ChooseMonth), expression as below,

if(I_Time_Key>v_Daily_MonthBegin_lastyear

AND I_Time_Key<=v_Daily_MonthBegin,

ChooseMonth).

When we select from ChooseMonth, we want to judge what we selected and the count we selected, but when we use GetSelectedCount(ChooseMonth) or GetFieldSelections(ChooseMonth), it not works. May i know how to achive the fuction? Thanks.

8 Replies
YoussefBelloum
Champion
Champion

Hi,

to count how many ChooseMonth you have selected, you can use GetSelectedCount(ChooseMonth)


to get the values you selected on ChooseMonth, you can try this: Concat(ChooseMonth,',')

zhaohaifeng
Contributor III
Contributor III
Author

Hi,

For value Concat(ChooseMonth,','), it works.


But for count GetSelectedCount(ChooseMonth), the count always 0 , no matter what you sleected. Do you know the reason. Thanks.

YoussefBelloum
Champion
Champion

It is weird.. would you be able to attach sample app ?

avinashelite

In which fields you have made the selections ?? could you please share the sample app

zhaohaifeng
Contributor III
Contributor III
Author

Attached. thanks

zhaohaifeng
Contributor III
Contributor III
Author

Attached. thanks

YoussefBelloum
Champion
Champion

the ChooseMonth field is empty on the attached file

zhaohaifeng
Contributor III
Contributor III
Author

Please selecte one country in the Qs, and refresh the QS use attached data source as we set scetion access for only one country in actual report. Thanks.