Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ZoeM
Specialist
Specialist

If Statement for Selections made in a Field

Hi Community,

I have a field which has numeric values and I am trying to write an IF statement based on the selections made within that field, "# Days Post VPP". 

I have several action buttons and each action button selects a series of values from the #Days Post VPP field. 

I am trying to use the GetField Selections to determine what has been selected and calculate off of that:

If(GetFieldSelections([#of Days Post VPP])='>14', Count({$<[Gateways],[Date Type]={'VPP Dates'},Reference_Only={'No'},[#of Days Post VPP]={'>14'}>}[Gateways]),
Count({$<[Date Type]={'VPP Dates'},Reference_Only={'No'},[#of Days Post VPP]=-{' '}>}Gateways) )

But I am not able to get the intended results. Any help rendered will be truly appreciated. 

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

can you explain what the desired result is and what you are getting with screenshots?

Can more that one value be selected for "# Days Post VPP"? if so GetFieldSelections will not be helpful. You may need to do something like concat([# Days Post VPP],'|') and try to search the values you want within it
ZoeM
Specialist
Specialist
Author

The field # Days Post VPP has numeric values 1 - xx for thousands of line items. I have a button that selects values (>14 ) for analysis. 

I thought GetFieldSelections was going to help me as mentioned in the expression above. 

dplr-rn
Partner - Master III
Partner - Master III

put GetFieldSelections([# Days Post VPP]) into a text field and you will see that after a certain point it displays 10 of 2000 or something similar
you need concat to get the full list of values

Hope it helps
ZoeM
Specialist
Specialist
Author

Still didnt provide a workable solution...

dplr-rn
Partner - Master III
Partner - Master III

Please share a sample app.