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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
safik003
Contributor III
Contributor III

Select only one value from a filter

Hi,

I have four filters. I want to select only one value from each one of these i.e only value from one filter accordingly data will be shown in the chart.If user wants to select more than one value from one filter, it should restrict the user from selecting multiple values. I have tried by checking "Always One Selected Value", it's not giving me the expected feature.

PFA the file for reference.Thanks.

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

The problem is that applying 'Always one selected value' to all the 4 fields can be done, but if you do this your selection will be sort of locked.  For example... if let's say we have these selections

Capture.PNG

Now you want to select 2/1/2018... but you won't be able to do that because 2/1/2018 is associated with 2 Produt No... 2 and 8, but right now 1 is selected... so what should happen? clear Produt No field so that user can select 2 or 8... but if you have Always one value selected... you can't clear selection. Select between 2 or 8? This again can't be done because the system is not programmed to do this.

I think the best way to handle this is to only display the chart when the user have made one and only one selection in the 4 fields. This can be done on the general tab by adding a condition and an error condition

Capture.PNG

Now when you select more than one in any of the list boxes... you will see this

Capture.PNG

 

View solution in original post

8 Replies
sunny_talwar

What is the expected feature? Can you provide an example of the expectation?
safik003
Contributor III
Contributor III
Author

I need to select only one value from each filter. The reason is why I want to select only one value is like that by expression I'm showing only three values for "Product No". For example if I select Product No as 4, in my pivot table I'm showing data for 3,4 and 5. If I select select "multiple" Product No from the filter like 2 and 4, the pivot table will show value for 1,2 ,3 and 3,4,5 respectively. i don't want to show more than three values in my pivot table.So I need to select only one value from the filter.Hope you got it. You can check the attached files. there I'm showing in 3 rows for Product No. Did you get my point or need to explain more?

Or
MVP
MVP

If I understand correctly, you want to force only one of the four fields to have a selection at any given time. If a user were to select something from another field, you want the existing field filter cleared.

 

If that is the case, you can do this with a trigger. Settings / Document Properties / Field Event Triggers. For each of these fields, add OnSelect triggers that will clear the other three fields (Clear Field x3, one per field to be cleared, I don't think there's any way to do it with just one action).

safik003
Contributor III
Contributor III
Author

No. That's not the case.

I want to select only one value from one field.If a user try to select more than one value i.e multiple value from a filter, it will restrict the user from selecting multiple values from one filter. that is my requirement, there is a reason behind it. Is there any way to restrict the user from selecting multiple values from a filter? Thanks.

Or
MVP
MVP

Yes. Mark a value and then "Always one selected". You said you tried that and it didn't give you the expected result, though - but you didn't explain (or it isn't clear to me) what the "expected result" is. I used your file with "Always one selected" and it works fine as far as I understand your requirement.

sunny_talwar

The problem is that applying 'Always one selected value' to all the 4 fields can be done, but if you do this your selection will be sort of locked.  For example... if let's say we have these selections

Capture.PNG

Now you want to select 2/1/2018... but you won't be able to do that because 2/1/2018 is associated with 2 Produt No... 2 and 8, but right now 1 is selected... so what should happen? clear Produt No field so that user can select 2 or 8... but if you have Always one value selected... you can't clear selection. Select between 2 or 8? This again can't be done because the system is not programmed to do this.

I think the best way to handle this is to only display the chart when the user have made one and only one selection in the 4 fields. This can be done on the general tab by adding a condition and an error condition

Capture.PNG

Now when you select more than one in any of the list boxes... you will see this

Capture.PNG

 

safik003
Contributor III
Contributor III
Author

I think I got it what I was looking for. It's a great way to deal with such problems. Thank you very much @sunny_talwar. Your efforts are much appreciated.
safik003
Contributor III
Contributor III
Author

It's not giving me the expected result, the reason is wonderfully described by @sunny_talwar. Thanks for your effort though,mate.Cheers!