Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
DutchArjo
Creator
Creator

Set hard filter for table, independent from selected value

I have a worksheet with multiple tables.

example:

chart.PNG

 

The tables on the bottom have to be filtered by the filter 'team'.

the table on the top has to be filtered on a hard value, independent of what is selected in the filter in the blue square.

 

I created a filter for the upper table with the expression:

if(Team='Staf', Groep,)

which worked.

But then I created the lower 2 tables which do have to be filtered by the selected value in the blue square (only 1 selected possible). However, this changes the table on the top also.

 

I then thought: I create an alternate state for the table on the top so the selection in 'Team' doesn't affect this table, but I ended up with 'Team' being in the selection bar, showing 'selection in 2 states'.

Knipsel.PNG

I do not want selections in 2 states. I only want selections in 1 state.

 

How can I achieve this? Is it possible to have the top table filtered on a hard coded value and not being affected by any selection made in this variable AND the variable not having 'selections in 2 states' in the active selections bar? I want to be able to quickly change the selection of 'team' as I expect the user not to understand for which state the selection has to be changed.

15 Replies
marcus_sommer

My suggestions wasn't originally meant as a calculated dimension else as expressions whereby they might be suitable for your task. An aggregation-calculation couldn't be directly used as calculated dimension else they needs to wrapped with an aggr() to specify the dimensional context in which the aggregation should be performed and may then look like:

aggr(maxstring({ Set }  Field), Dim1, Dim2)

DutchArjo
Creator
Creator
Author

Thank you This is one the things I do not understand yet. Probably should first finish my Udemy Qlik Sence course 🙂

DutchArjo
Creator
Creator
Author

Though I have not finished my Udemy Qlik Sense Course yet, I have a working solution for my issue, although I only have 1 table:

this set analysis function filters the data based on the selected value in the variable 'peloton':

=Aggr(Only({1 <[gp nieuwe ehd] = {'$(=left(right(GetFieldSelections([peloton]),3),1)&'.10')'} >} [gp nieuwe ehd]),[gp nieuwe ehd])

I am sure I will have other issues when I continue with other features in the dashboard but for now it works as wanted.

 

dagosto
Contributor III
Contributor III

Hello,

In this case, in the table above, use an expression to show the column Groep as:

Only({<Team={'Staf'}>} Groep)

This way this table will disregard what is selected in the field Team and force the value 'Staf'

Hope it helps.

Regards,

Fernando

DutchArjo
Creator
Creator
Author

Thank you for your suggestion. The groeps consist of a number and a decimal: 1.10, 1.20, 2.1, 2.20 etc.

Based on the selected Team, I only want the groeps to show that belong to the selected team. The number in the groep number is the first digit of the team number (100,200, 300 etc).

So all groeps belonging to team 100 start their groep number with 1.

That is why I use the team number in the expression.

 

For the 'Staf' table I will adjust it because that shouldn't change based on the selected team.

 

edit: when I only use the 'only'  function, it will become an invalid dimension.

 

DutchArjo
Creator
Creator
Author

I don't get it. One moment it's working, the next it isn't. How is that possible?

 

Edit: it works fine as long as no Team is selected. But when a team is selected, the function does not work. Is the set analysis identifier at the wrong place?