Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm new to qlikview, its my first week.
I have a table containing multiple columns. I want to show a list box of one of the columns, but I want it restricted by another column.
ie.
ColumnA ColumnB
X A
X B
X C
X D
Y E
Y F
Y G
Y H
So I create a List box using the field 'ColumnB', but want it restricted so that it only shows ColumnB values where ColumnA = X
ColumnB
A
B
C
D
Other posts have referenced using the Expressions tab, but I can't seem to get this to work. Having an expression
ColumnA='X' as the expression just adds a column with 0 and -1 in it. How do I hide this column and have it only show the results that I want (i.e. not the ones that now have a 0).
Any help would be appreciated.
Use expression for this as
=if(ColA='X',ColB)
See this sample
on the list box of Column B Right click -> properties -> in drop down of field select in expression ->press edit
write this expression
=Aggr(Only(ColumnB),ColumnB)
when you click list box Column A X then A,B,C,D will be displayed only.
anant
Hi sujeet
I have copied your simple example exactly and it works. However when I try to implement it with my solution, now nothing is returned in my list box.
With a bit of trial and error, I have found that my solution works only with
=IF(WildMatch(ColA,'Str*'),ColB)
as my string has spaces in it, but doesn't seem to work at all when i have the full string listed. Is there something different I should be doing if I am trying to match a string with spaces in it?
What also is confusing is that now on my filtered list, when I make a selection the Auto Sort doesn't seem to work.
Jamie,
It should work but may be the expression is going wrong .
Can you provide the sample file please .
Anant ,
When there is association in the two filters then you need not two write any expression in the list box ,and when you will select 'X' in one list bos then the other list box will only show the values of Field B having 'X' in the previous field.
Hi all
I did manage to get it to work. I think I was trying to be too complex with my solution with use of wild cards, but have got it working now using the methodology provided by @sujeetsingh. In fact I have even managed to use multiple conditions to filter my list by way of nested if's.
I think my previous attempts may have had an issue with getting the correct case, but all good now.
Thanks
Why you don't mark as answered?