Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
michael_maeuser
Partner Ambassador
Partner Ambassador

Listbox problem?

Hello everyone,I have a table chart with a column "Status" (It tells me if the inventory is too high, too low or ok). The formula within that column looks like that:
=
if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))<Lagerartikel.Sicherheitsbestand,'Sicherheitsbestand unterschritten!',if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))>sum(Lagerartikel.Max.Bestand),
'Maximalbestand überschritten',
if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))<sum(Lagerartikel.Minimalbestand),
'Minimalbestand unterschritten!', 'Bestand OK')))
Now I want to create a listbox with 'Maximalbestand überschritten', Minimalbestand unterschritten, Sicherheitsbestand unterschritten and Bestand OK. It seems to be pretty simple but I can just not find a solution.How can I do s.th. like that? Thanks in advance! Michael
1 Solution

Accepted Solutions
swuehl
MVP
MVP

You probably want your list box values linked to the table chart, so if you select a value from the list box, you want to filter the table? Like if clicking on 'Sicherheitsbestand unterschritten!' in your table, Bauteil 30100 and Bauteil 30110 will be selected.

To get this link from selectable values in a list box to selected dimension, I think you need to use advanced aggregation in your list box:

=aggr(

if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))<Lagerartikel.Sicherheitsbestand,'Sicherheitsbestand unterschritten!',if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))>sum(Lagerartikel.Max.Bestand),
'Maximalbestand überschritten',
if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))<sum(Lagerartikel.Minimalbestand),
'Minimalbestand unterschritten!', 'Bestand OK')))

, Artikel)

Put this expression as field expression in your list box (General tab, scroll down list of fields to <Expression> )

You will need to add the same dimensions (I assumed Artikel) to your aggr() function than in your table chart.

Hope this helps,

Stefan

View solution in original post

2 Replies
swuehl
MVP
MVP

You probably want your list box values linked to the table chart, so if you select a value from the list box, you want to filter the table? Like if clicking on 'Sicherheitsbestand unterschritten!' in your table, Bauteil 30100 and Bauteil 30110 will be selected.

To get this link from selectable values in a list box to selected dimension, I think you need to use advanced aggregation in your list box:

=aggr(

if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))<Lagerartikel.Sicherheitsbestand,'Sicherheitsbestand unterschritten!',if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))>sum(Lagerartikel.Max.Bestand),
'Maximalbestand überschritten',
if(sum(if(SaldoDatum=Today(), [Täglicher Saldo]))<sum(Lagerartikel.Minimalbestand),
'Minimalbestand unterschritten!', 'Bestand OK')))

, Artikel)

Put this expression as field expression in your list box (General tab, scroll down list of fields to <Expression> )

You will need to add the same dimensions (I assumed Artikel) to your aggr() function than in your table chart.

Hope this helps,

Stefan

michael_maeuser
Partner Ambassador
Partner Ambassador
Author

Thanks, works perfect!