Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

fanko1225
Contributor

Can you exclude items from listbox?

Hi All,

I have a field called [Reporting Date] where it has quarter dates. I want to create 2 listboxes for this [Reporting Date] field where i want to show in First Listbox and Second Listbox:

[Reporting Date]:

3/31/2015

1/31/2015

12/31/2014

9/30/2014

First Listbox: just want to show current or most current quarter. With the above quarter dates, it should only show "3/31/2015"

Second Listbox: It's the opposite to the first i want to show all quarters except "3/31/2015"

1/31/2015

12/31/2014

9/30/2014

I have tried "Only()" without any success. Any inputs will be greately apprecaited!

Frankie

1 Solution

Accepted Solutions
pokassov
Valued Contributor

Re: Can you exclude items from listbox?

Hello!

See attach. !

4 Replies
MVP
MVP

Re: Can you exclude items from listbox?

Use these expressions in the listboxes:

Aggr(If(InQuarter([Reporting Date], Today(), 0), [Reporting Date]), [Reporting Date])

Aggr(If(InQuarter([Reporting Date], Today(), 0), [Reporting Date]) = 0, [Reporting Date])

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
fanko1225
Contributor

Re: Can you exclude items from listbox?

Hi Jonathan,

I tried both of your expressions in the listboxes but I couldnt get it right. can you see attached qvw to see if i missed anything? Thank You.

pokassov
Valued Contributor

Re: Can you exclude items from listbox?

Hello!

See attach. !

fanko1225
Contributor

Re: Can you exclude items from listbox?

Thank You!

Community Browser