Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MRitter
Employee
Employee

Have a filter ignore a field that is defined as 'Always one selected'

I have an app with multiple sheets.  Each sheet is basically using a different data source.  But they are all connected with a xref table that contains Division, Department, etc.

On one sheet I need to make a field 'always one selected'.  Works great on that sheet.

But on my other sheets the filters for Department,Division etc. are being limited because of this field.  I don't want that.  The other sheets should ignore this field.

Is there a way to accomplish this with a filter object?

5 Replies
Vegar
MVP
MVP

My first thought was to cancel the selection of your field in each expression using a set modifier on that field, like this:

Sum({<YourAlwaysOneSelectedValueField=>}Amount)

 

My second thought,  after reading that you want the field in a filter object, was to suggest using multiple states on each sheet. If you're not familiar with alternate states then you could start looking at @stevedark  blogpost Alternate States in Qlik Sense .

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Vegar,

Thanks for the mention, but I think I would go with your first idea of Set Analysis. The main reason being is that even if alternate states was used you would then need Set Analysis to make the selections on the common fields, using Division=P({$}Division),etc...

My first reaction would be to have multiple apps, with current selections on the key fields being passed in a URL from a navigation button. Whilst this meets the separate apps for different data sources best practice, it does feel like it misses a trick.

The best route would be to use the CONCATENATE statement, rather than a join, and perhaps implement the one selected using Set Analysis and a variable. This would only then be enforced as required.

The variable would contain:

=minstring(OneSelectedField)

And the expression;

Sum({<OneSelectedField*={ '$(vOneSelected)'}>}Value)

I would then use the vOneSelected variable on the label of the filter for that field.

I use that technique on my Cycle Group in Qlik Sense blog post, if you want to Google this.

Hope that helps.

Steve

Shubham_Deshmukh
Specialist
Specialist

Hi @stevedark ,

Is it possible in filter ? 

I have filter F1, which is "Always selected on" (Complusory have to keep it).

On F1, my second filter F2 is dependent. I want to ignore F1 in F2 's Else part, F2 has if else blocks.

How I could do it? 

 

Shubham

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You want to ignore the field with set analysis in an expression on the second filter pane.

It will be something like:

=aggr(maxstring({<F1=>}F2),F1)

It may even work without the aggr.

Good luck.

Shubham_Deshmukh
Specialist
Specialist

Thanks for quick responce.

I am doing something like this, not working as expected, I have 1 condition due to which I have to use If else kind of functionality

Role - 1 more filter

=
aggr(maxstring({<
Match(Role,'Admin'),
Consider_all_Relationships_where=>} Relationship),Units)