Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hide or exclude values in a Listbox

Hello all,

I have two tables in my QV applications;

The FactTable

ProductNr,Value

1,100

2,75

6,87

7,64

8,24

10,976

and a Dimension

ProductNr,ProductDescr

1,A

2,B

3,C

4,D

5,E

6,F

7,G

8,H

9,I

10,J

In the listbox I use I only want to show the products with a value in the facttable.

I have tried to use an expression in the general tab in the listbox like;

If(Sum(Value)>0,ProductDescr)

But this doesn't work. Can anyone help me out here, thnx in advance.

1 Solution

Accepted Solutions
Not applicable
Author

Hi sandergoudsblom,

if you insist of calc it in the frontend: you have been very close. You need to add the aggr()-function within your listbox-expression:

=aggr(If(Sum(Value)>0,ProductDescr), ProductDescr)

Regards, Roland

View solution in original post

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    You can change the data model.

    Create a alise field of ProductNr in Fact Table. Like

   load ProductNr,

   ProductNr as Product,

   Value

   From ........

   Now you can use Product in listbox. this will only show you the values from fact table.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

That's a good one! Is this the only solution, or is it also possible to do this in the front-end?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Yes there is but in that case it will not be a list box, It will be a chart.

    Use the same chart you have created. Just convert it into straight table. Then go to properties -> presentation -> click on the expression and click hide column.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi sandergoudsblom,

if you insist of calc it in the frontend: you have been very close. You need to add the aggr()-function within your listbox-expression:

=aggr(If(Sum(Value)>0,ProductDescr), ProductDescr)

Regards, Roland