Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing a set of filters in qlikview

Hi all ,

I have this below given requirement to display as a table in the qlikview document with the set of filters passed for filtering the data.

surveyprod ctgcharchar typerate 1rate 2rate 3volume
s1catg 1factor1type 1846100
s1catg 1factor2type2766200
s1catg 1factor3type 3978300
s2catg 1factor1type 1957400
s2catg 1factor2type2977500
s2catg 1factor3type 3989600
s2catg 2factor4type 1747700
s2catg 2factor2type2867800
s2catg 2factor3type 3989900

the filters given on the report are :

1.survey

2.prod ctg

3.char

4. char type

5. range slicer(0-10)

output table displays the following columns

1.survey

2.prod ctg

3.char

4.char type

5.volume

the requirement is that the user must be allowed to pass 6 sets of filter.

set of filters include one from the available 5 filters(survey,prod ctg,char,char type,range slicer value)

OR condition needs to be applied when the filter values are passed.

for example: set1 filters OR set2 filters (output will now diplay the data for both the filters selected in set 1 and set 2 )

as i am new to qlikview , i have no idea how to solve this..

can this be handled by setanalysis ? if not then how can this be handled.

Kinldy help with any supportive expressions.

will be greatfull for any kind of help on this post .

thanks.

50 Replies
sunny_talwar

I guess chandana.gowdar‌ wants to select a set of selection and then remove them and then make another set of selections. If the additional selections can be on top of the first set of selection... then I guess you are right. But if the selections are removed, how will this still work?

Anonymous
Not applicable
Author

Hi Rob ,

I am sorry to say that you have misunderstood the requirement.

the actual requirement is that i have 5 filters(list boxes with multiple selection enabled)

i want to select 1 or multiple selections in each list box, which will be treated as set 1 ,

for example SET 1 Filter =

Filter 1 = A and B

Filter 2 = India

Filter 3 = Earth

Filter 4 = Water

Filter 5 = 5000

so here SET 1  = (Filter 1 + Filter 2+Filter 3+Filter 4+Filter 5)


once the SET 1 is selected the data related to these filters will be displayed in the result set table.


Next step : clear ONLY  THE FILTERS AND THE RESULT SET TABLE REMAINS SAME WITH THE RESULT SET OF SET 1


Like this User should be allowed to select 5 SETS .

WHEN SELECTED SET 2 , THE RESULT SET SHOULD BE APPENDED WITH THE SET2 WITH THE ENTRIES WHICH WERE PRESENT FOR SET2.

SORRY IF I HAVE CONFUSED YOU TOO MUCH, BUT ACTUALLY THIS IS THE REQUIREMENT.

THANKS

swuehl
MVP
MVP

Rob, i think a single set (of list boxes) wouldn't allow

Cat1 and factor1

OR

Cat2 and factor2

swuehl
MVP
MVP

You can conditionally hide / show the list boxes using the feature on layout tab:

2018-03-14 14_05_18-QlikView x64 - [C__Users_Stefan_Downloads_Community_294299.qvw_].png

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I could see an edge case where you may need to separate selections.  But when the OP said they were new to QV, I thought they may be missing that a simple solution would be to have the use make multiple selections.  I see requirements like this occasionally from new customers where they try to make QV operate like a workflow/app they are used to.  It's not always a good idea and usually resolved with simple QV by taking a step back and understanding the business requirement.

All that said, if someone wanted to build up a set of discrete filters and union the results, I would think the solution would be a modified version of something like this:

Qlikview Cookbook: Defer Selections Until Apply http://qlikviewcookbook.com/recipes/download-info/defer-selections-until-apply/

where a button copies the selections into incrementing alternate state slots. When all slots are filled the chart displays.  Another "reset" button resets the alternate state index.

-Rob

MarcoWedel

Hello Sunny,

I tried with dynamically created previous selection set identifiers like {$1+$3+$5} but failed (I guess due to trigger effects when storing the current set state in a variable).

Maybe this might be a solution nevertheless (when done properly).

regards

Marco

Anonymous
Not applicable
Author

Hi Rob ,

Thanks for providing the link , i tried implementing that and it has partially helped me to get closer to the requirement.

There is one catch here , before clicking on the "apply filter " button i want to pass sets of filters.

here a set means single or multiple selection of the filters . here i need to figure out how to capture or convey qlikview to consider the selections as set 1 and then create a button to say "select 2nd set of filters". then use your "apply filter" button.

currently this is the situation, if you have any ideas on how to achieve this , please suggest.

Many Thanks.

swuehl
MVP
MVP

Here is a quick sample QVW that demonstrates an approach using alternate states with a single set of list boxes.

You can set basically two sets, but the demo can be easily expanded to as many as you like.

MarcoWedel

Hi,

maybe another solution could be:

QlikCommunity_Thread_294299_Pic1.JPG

QlikCommunity_Thread_294299_Pic2.JPG

QlikCommunity_Thread_294299_Pic3.JPG

QlikCommunity_Thread_294299_Pic4.JPG

QlikCommunity_Thread_294299_Pic6.JPG

=vSelSets&If(Len(GetCurrentSelections()),If(Len(vSelSets),'+')&'1<['&GetCurrentSelections(Chr(39)&'}, [',']={''',Chr(39)&','&Chr(39))&Chr(39)&'}>')

QlikCommunity_Thread_294299_Pic5.JPG

QlikCommunity_Thread_294299_Pic7.JPG

hope this helps

regards

Marco

MarcoWedel

Hi,

another solution might be to apply this approach on a key field:

grouping dimension values

hope this helps

regards

Marco