Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys,
New to Qlikview.
Is it possible to only display values on a list box depending on how many times I have it on my excel file?
I have this excel file that has a client ID twice, and i want to display that on my list box and hide whatever is less than 2.
Thanks in advance.
Hi
Agrree to Satyadev.
Just make 1 instead of 2 in if condition.
=if(aggr(count(fieldname),fieldname>1,fieldname)
Hi Leonardo,
Try by crating a list box and using expression rather than the field itself (look at the very bottom of the field list for expression), write it like this...
If(Count(<field> >2, <field>)
where <field> is the field you want to display.
--john
Hi,
Try below in list box
=If(Aggr(Count(fieldname), fieldname)>2, fieldname)
Thanks
Hi guys, thanks for the quick responses.
If I use any of those formulas I don't get anything displayed.
Look into attached file
Thanks Satyadev, but I can't open the file, I am running the personal edition of Qlikview.
Hi
Agrree to Satyadev.
Just make 1 instead of 2 in if condition.
=if(aggr(count(fieldname),fieldname>1,fieldname)
Ok. So what actually I am doing in attached file is, I have created one inline table (see below) which has some duplicates record,
Temp:
LOAD * INLINE [
empname
abc
abc
abc
xyz
xyz
xyz
efg
efg
uvw
];
And after reload, I used below script in list box's expression to sort out your issue.
=If(Aggr(Count(empname), empname)>2, empname).
PS: You have to click on <Expression> from field drop down in list box object (see below) and copy the above expression.
Hope this helps you
Satya
Thank you guys!!!!
That worked like a charm!
All sorted out!
Just curious...why use 'aggr' when it is not necessary? When you are dealing with just one field all it does is create unnecessary extra overhead.
--john