Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How can I filter a dimension within a "filter pane" by using an expression

Hello

I have the dimension "Department" with a list of 5 departments (Finance, HR, Operations...) I know that I can manually click and select one department and filter it, but I would like to edit the Filter Pane and create an expression in order to show only one department so that every time I open the report the information is already filtered

I have tried to do set analysis using the same logic as we use for measures "+sum({1<Department = {HR}>}" but i cannot get it

Could you be so kind to help me?

Thanks in advance

A

16 Replies
Neymar_Jr
Creator II
Creator II

Hi,

May be this -

aggr(only({<Dept = {'HR'}>}Dept),Dept)


Thanks

RT

Anonymous
Not applicable
Author

Hi Rajesh

With this expresion I have only the option to filter HR, which is a good advance :-), but how can i do in order to set the filtr automatically when the sheet is opened?

Anonymous
Not applicable
Author

Probably with extension Qlik Branch?

vishsaggi
Champion III
Champion III

Oh ok. May be you have to use an extension.

dwforest
Specialist II
Specialist II

this variable project on branch allows you to use buttons/text box/slider to change a variable's value

Qlik Branch

This could then be used in a set expression for the measures; still won't populate a filter bar and you would then need to use this to provide the UI for your filtering (more work with Set Analysis)

Another option is this project which provides buttons that you can select bookmarks or field filters with

http://branch.qlik.com/#!/project/56728f52d1e497241ae698a0

This means it will not be automatically set, but one click away.

mikaelsc
Specialist
Specialist

if you want to avoid selecting a value, you could use set analysis in all of you expressions:

Department = {"$(=maxstring(Department))"}

however, this implies that multiple selections on department will still only show the Measure for the alphabetically last one

Anonymous
Not applicable
Author

thanks I will try and let you know