Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
survey | prod ctg | char | char type | rate 1 | rate 2 | rate 3 | volume |
s1 | catg 1 | factor1 | type 1 | 8 | 4 | 6 | 100 |
s1 | catg 1 | factor2 | type2 | 7 | 6 | 6 | 200 |
s1 | catg 1 | factor3 | type 3 | 9 | 7 | 8 | 300 |
s2 | catg 1 | factor1 | type 1 | 9 | 5 | 7 | 400 |
s2 | catg 1 | factor2 | type2 | 9 | 7 | 7 | 500 |
s2 | catg 1 | factor3 | type 3 | 9 | 8 | 9 | 600 |
s2 | catg 2 | factor4 | type 1 | 7 | 4 | 7 | 700 |
s2 | catg 2 | factor2 | type2 | 8 | 6 | 7 | 800 |
s2 | catg 2 | factor3 | type 3 | 9 | 8 | 9 | 900 |
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.
Here's a modification of my example that lets you make selections and then add them to the next filter slot. Only filter slots that have selections will be applied to the charts. I have 5 states. I'm rotating through them but you could design the flow any way you want, i.e. add to specific filter etc.
Edit: modified the qvw to use a slider to set the manual index. Much more fun.
-Rob
here's the (non functioning!) example using previous selection set identifiers:
Marco
Hi Rob ,
Thanks for the solution, i have implemented the same and seems like this is what wanted.
But just facing one minor issue of displaying all the data before applying any filter in the table. i.e Default selection should be "All" and only when the filters passed the data in the table should get filtered.
i am also working on how to achieve this , meanwhile if you have any idea kindly suggest solution for the same.
Many Thanks
Chandana
Modify the expression (variable vFilterStates in my example) to include state $ if all the Filtern states are empty.
-Rob
Hi Rob ,
Should i add a new state Filtern ? or modify the variable vFilterStates 's definition ?
can you give me the expression for reference please.
Thanks
Depends on your designed workflow.
You also have a variable vFilterIndex that you can use:
=
If( vFilterIndex =1, '1',
if(len(GetCurrentSelections('','','',1,'Filter1'))>0, 'Filter1+','')
& if(len(GetCurrentSelections('','','',1,'Filter2'))>0, 'Filter2+','')
& if(len(GetCurrentSelections('','','',1,'Filter3'))>0, 'Filter3+','')
& if(len(GetCurrentSelections('','','',1,'Filter4'))>0, 'Filter4+','')
& if(len(GetCurrentSelections('','','',1,'Filter5'))>0, 'Filter5+','')
& '0'
)
Hi Stefan,
Thanks for the response , i modified the expression as given below: (found this in another question in the community):
= If( len(GetCurrentSelections('','','',1,'Filter1'))
+ len(GetCurrentSelections('','','',1,'Filter2'))
+ len(GetCurrentSelections('','','',1,'Filter3'))
+ len(GetCurrentSelections('','','',1,'Filter4'))
+ len(GetCurrentSelections('','','',1,'Filter5'))
=0, '$',
if(len(GetCurrentSelections('','','',1,'Filter1'))>0, 'Filter1+','')
& if(len(GetCurrentSelections('','','',1,'Filter2'))>0, 'Filter2+','')
& if(len(GetCurrentSelections('','','',1,'Filter3'))>0, 'Filter3+','')
& if(len(GetCurrentSelections('','','',1,'Filter4'))>0, 'Filter4+','')
& if(len(GetCurrentSelections('','','',1,'Filter5'))>0, 'Filter5+','')
& '0')
this worked for me ..
Thanks
Hi Rob ,
Excellent!!
This is what i was looking for and this serves my exact requirement .
but with just one small change. instead of the & filters in the variable i want to pass the data which will satisfy all the 5 filters applied.
which means the data which matches all the filters in 5 sets should only display in the result chart / table.
Should i change in the vFilterStates variable expression or should i modify the expression in the chart.
Kindly suggest on how to achieve this.
Thanks
If the data should match all the filters, isn't that the same as normal Qlik selection logic?
-Rob
No, it is not showing matching values. all selections related rows are appending one by one
Here, i am giving one example for my requirement from your file only:
If i select for filter 1: Baby Clothes in Category Name, Aino Shoes from Product name, 2012 from Year and
for filter2:Baby Clothes in Category Name, Deuce Shirt from Product name, 2013 from Year
then i want out like this
2422 | 2/16/2012 | Baby Clothes | Aino Shoes | Halle Köln | Bob Park | 41 |
2422 | 2/16/2012 | Baby Clothes | Deuce Shirt | Halle Köln | Bob Park | 11 |
4665 | 1/21/2013 | Baby Clothes | Aino Shoes | La Moda d'il Futuri | Ricardo Gucci | 61 |
4665 | 1/21/2013 | Baby Clothes | Deuce Shirt | La Moda d'il Futuri | Ricardo Gucci | 12 |
But output is not showing like this, it is showing selections related 572 rows some thing
Here i attached your file also.. in that file i made some changes so, based on that give some suggestions
Thank you in advance
Sudhakar