Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

es-amorales1
New Contributor

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
isingh30
Contributor III

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

Try this

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

Thank you!

isingh30
Contributor III

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

Can you share your sample application or data?

vishsaggi
Esteemed Contributor III

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

You might want to use OnOpen or OnActivate sheet trigger to select HR in your department field. Is this what you are looking for? IF yes, then use this trigger adding Action item as Select in Field - Then give your field name - String search will be HR. 

es-amorales1
New Contributor

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

Thanks all of you for your answer

I tried to do it but it only works when I write this expresion in a KPI(measure data) no for a Filter Pane (Dimension Data)

The idea is to write an expression which do a filter within filter pane and this filter pane affect all te data & graphs of the entire sheet.

Find attached example

MVP
MVP

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

Have you tried a simple If statement like:  =If(Dept='HR', Dept)

es-amorales1
New Contributor

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

Hi

Thanks for your answer but sorry i cannot understand very well the steps I have to take. What doy mean exactly?

es-amorales1
New Contributor

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

Thanks

I have tried but just have a look on the result. Attachment "Qlik Result"

vishsaggi
Esteemed Contributor III

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

Try this:

OnOpenTrigger.PNG

OnOpenTrigger_1.PNG

So when you add this action save the file and reopen it should select HR as default in your dept.

es-amorales1
New Contributor

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

Dear Vishwarath

Thanks for the screenshots, probably it helps me but how can i get that menu? I only use Qlik Sense

Do i need to download any other extension? probably Qlik Branch Probably?

Thanks

A

Community Browser