# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for
Did you mean:
Contributor

## Get a value from selected value in filter pane

Anyone know how to get a value from filter pane? For example in "Year" filter pane user choose 2018, then I need to use this value in the expression. Thanks a bunch!
1 Solution

Accepted Solutions

GetFieldSelections(Year) will return a list of years if the user selects more than one, and will return nothing of nothing is selected. This behaviour may be what you want.

An alternative is to use =Max(Year). This will always return exactly one value. If the user selects a year, this will return the selected year. If no selections are made, it will return the latest year in the data set. If the user selects more than one year, then this expression will return the maximum of the selected years. T

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
6 Replies
Master

Hi, Use this.

=GetFieldSelections(Year)

GetFieldSelections(Year) will return a list of years if the user selects more than one, and will return nothing of nothing is selected. This behaviour may be what you want.

An alternative is to use =Max(Year). This will always return exactly one value. If the user selects a year, this will return the selected year. If no selections are made, it will return the latest year in the data set. If the user selects more than one year, then this expression will return the maximum of the selected years. T

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Contributor
Author

@shiveshsingh Thanks for reply! I tried your solution in my expression but got an error sum({<[Year]={GetFieldSelections(Year)}, [Type]={"*Forecast"}>}[Sales], did I make a mistake here?

Master

Try this

=sum({<[Year]={"\$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])

Contributor
Author

@jonathandienst thanks for the solution, it works for me, cool! thanks so much

Contributor
Author
yes, this format works, sometimes I got confused with the brackets, they are so many! anyway, thanks for your help shiveshsingh
Tags
Community Browser