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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Stars
Creator
Creator

GetFieldSelections as Value

I'm trying to use GetFieldSelections to return a value and I can't figure out what I'm doing wrong.

 

When I write an equation that says:

Sum({1<Question={"Statistics*"},Year={'2010'}>}Response), Qlik understands what I'm saying.

When I write it like this, so Qlik would be finding the selected year:

Sum({1<Question={"Statistics*"},Year={getfieldselections(Year)}>}Response), Qlik doesn't recognize what I've selected.

 

How do I get my selected field (in this case, whatever year I'm choosing) to be recognized?  Thanks.

 

 

1 Solution

Accepted Solutions
MayilVahanan

Hi @Stars 

Try like below

Sum({1<Question={"Statistics*"},Year={$(=GetFieldSelections(Year))}>}Response)

or, if you want to get the max year , if there is no selection in Year

Sum({1<Question={"Statistics*"},Year={$(=max(Year))}>}Response)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

Hi @Stars 

Try like below

Sum({1<Question={"Statistics*"},Year={$(=GetFieldSelections(Year))}>}Response)

or, if you want to get the max year , if there is no selection in Year

Sum({1<Question={"Statistics*"},Year={$(=max(Year))}>}Response)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.