Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

List box

Hi,

I want to display the duplicate values in the list box. Is there any way to do it. We can do it in the staright table but i want to do it in list box.

If i generate the unique key for each value and add it as the expression in the list box. Will it work. I tried to check it is not working. I am not sure i have missed something.

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you can do it using a function Dual, as a calculated List Box:

=Dual( DuplicateText, UniqueID)

This way, you will see the duplicate text values, but behind each value, there will be a unique numeric ID.

View solution in original post

10 Replies
swuehl
MVP
MVP

You can enable the option Show frequency in general tab of list box properties.Your can also sort by frequency.

This should help in finding the duplicate values.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you can do it using a function Dual, as a calculated List Box:

=Dual( DuplicateText, UniqueID)

This way, you will see the duplicate text values, but behind each value, there will be a unique numeric ID.

brindlogcool
Creator III
Creator III
Author

Thanks Oleg and swuehi,

Actually i want to display the duplicate values.


brindlogcool
Creator III
Creator III
Author

Hi Oleg,

I tried the dual function it works perfectly fine if i am using it without aggregation. If i use the aggregation function

like dual(aggr(only({<Name= Name>}Name),Name) ,Number) then it is not working

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

well, of course, if anything, you need to bring the Dual function into the AGGR. May I ask - what are you trying to accomplish with this AGGR? What's the end goal?

brindlogcool
Creator III
Creator III
Author

I am trying to implement the Hide exclude function using the Aggr.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You'll need to clarify it for me a little bit... What's wrong with the native "Hide excluded" function?

Nonetheless, if you are using AGGR, inserting the Dual into the AGGR should help:

aggr( Dual(only({<Name= Name>}Name)) ,only(Number)) ,Number)


Notice that you should also use Number as your AGGR dimension, not Name. If you use Name - you will get your distinct values, but you are trying to avoid that and show duplicate value (which I also need to understand better), and for that you need to aggregate by the Number...

brindlogcool
Creator III
Creator III
Author

Thanks for your response Oleg

  1.Hide exclude function works perfectly. It is not showing the non associated values but still shows the grey            color. That is the problem. I would prefer if i am not showing excluded values then there should not be grey          color.

  2. Reason is we are using it in offline app where only one list box is allowed to download. So normally users will       know only the customer name i would prefer to display the name in the list box rather than customer id.              

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Did the formula work for you?

Another, simpler way of doing the same is to concatenate Customer ID and the Customer Name in a single string - this way, the ID makes the combination of the two distinct.If you decide to do it, I'd recommend doing it in the script and not in the runtime...