Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
siri087
Contributor II
Contributor II

how to hide above values after selection made

Hi All,

Hope you doing well. 

I am struck at one place where I need to hide the above unselected values from the filter panel. 

Given is the below example 

Id

A

B

C

D

E

F

G

H

I

So, if the user selects Value "D" from the ID column, then the values "A, B, and C" should be hidden. Only the values after "D" should be visible to the user for selection.  Also, users should be able to select only two values from the ID column.

Labels (1)
  • SaaS

8 Replies
MatheusC
Specialist II
Specialist II

@siri087 

Insert the aggr() function in your field, leaving it like this,
change to your dimension.


=aggr(Field,Field)


-Matheus


Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
siri087
Contributor II
Contributor II
Author

Hi, @MatheusC ,

Thanks for your response.

Its not working as expected .  if we select the value "D"(left side) i only get a "D" value (right side) filter . As i need to see "D" to "I".

siri087_0-1720163483602.png

 

 

salmankojar
Partner - Creator II
Partner - Creator II

Hi @siri087 you can use below expression in your dimension fx of your filter objects.

=if(GetSelectedCount(ID) = 0, ID,
if(GetSelectedCount(ID) = 1,if(ID >= GetFieldSelections(ID), ID)))

siri087
Contributor II
Contributor II
Author

Hi, @salmankojar ,

Thanks for Quick response 

I am able to see the rest of the values after the selection was made, but the other values are in gray (right filter). So can we show them as available for selection? 

siri087_0-1720176852515.png

if we select "E" and "F" , we still need to see "G," "H,and "I," as they are below the selected values 

salmankojar
Partner - Creator II
Partner - Creator II

Hi @siri087 ..that is your requirement. User should be able to select only two values from ID column.

marcus_sommer

Why should the user not directly select the wanted values?

siri087
Contributor II
Contributor II
Author

Hi @marcus_sommer ,

there is nothing called unwanted .

If the user selects any values initially, the below values only need to be visible for the next selection. user should not select more than 2 values in the filter . 

marcus_sommer

By using one field - there is no initial selection and following on-top selections possible else the following selections will extend or exclude the initial one. If you want to use some kind of hierarchy you will need at least two fields. I suggest you elaborate the aim with real field-values a bit more detailed.