Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

Multiple strict selection in filter pane

My user wants to do quick selections by typing multiple values into filter pane then hitting Enter button. But here is an issue:

 

Suppose the filter has values: A, A1, B, B1, C, C1. The user wants to select A and B. If he types in:

A B

then hit Enter,  A, A1, B, B1 will all apply. What should he type in if he only wants to select A and B? 

7 Replies
tmackay2015
Partner - Contributor III
Partner - Contributor III

Try :  (A|B)

 

 

wanyunyang
Creator III
Creator III
Author

Thank you for your reply! It works, but since the user has a list of items to be selected, should he add a "|" between each item manually?

tmackay2015
Partner - Contributor III
Partner - Contributor III

Unfortunately Yes... where is the source of information?

In qlikview i just have used an input box and variable and action to process it so that any  delimiters get replaced with  the pipe character.

 

If they have notepad they can paste it in there then find and replace ',' with '|'

it is a few  more steps but not unbearable

 

 

 

wanyunyang
Creator III
Creator III
Author

Most of time source is excel spreadsheet. Users want to copy the column then paste into filter pane.

tmackay2015
Partner - Contributor III
Partner - Contributor III

something like this might work as a macro in excel....

the dataobject thing doesn't work sometimes so maybe use a scrap cell?

Sub ConcatSelection()

Dim cll As Range
Dim QlikHax As String
QlikHax = ""
For Each cll In Selection
If Len(QlikHax) Then
QlikHax = QlikHax & "|" & cll.Value
Else
QlikHax = cll.Value
End If
Next cll

QlikHax = "(" & QlikHax & ")"
Set MSForms_DataObject = CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
MSForms_DataObject.SetText QlikHax
MSForms_DataObject.PutInClipboard

End Sub

wanyunyang
Creator III
Creator III
Author

Hi, thanks for the reply! But is this for QlikView or QlikSense?

tmackay2015
Partner - Contributor III
Partner - Contributor III

That is VBA macro code.

It works in excel, You could likely adapt it to qlikview, but not Sense since Sense does not incorporate VB.

You can add it to the users personal book  or to the source file and assign a hot key  to make it similar to ctrl+C and ctrl +V  that they want.