Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
kishorj1982
Creator II
Creator II

List Box Issue

Hello All,

I have 2 source tables  concatenated in a single table in Qlik datamodel. These are differentiated by Flag=1 and Flag=2. I am having a list box called week but I want to show only those weeks where Flag=1 and other unrelated weeks (i.e. weith Flag=2) should be grey out.

Is there any way we can do it? For demonstration purpose I have added alternate state in the attachment.

Please suggest me how we can achieve it.

5 Replies
sunny_talwar

Can a straight table work?

Capture.PNG

swuehl
MVP
MVP

The white / grey background of week values is based on selection state, just as you did in your alternate state.

May i ask why you want to show your list box in this way assuming you haven't selected flag = 1 in your default state?

If you want to show only weeks when flag = 1, use a field list expression

=If(Flag = 1, Week)

sunny_talwar

You can give it a look and feel of list box:

Capture.PNG

kishorj1982
Creator II
Creator II
Author

Hi Swuehl,

Actually - if am not selecting Flag anywhere thats the issue.  But the sheet represents data only for Flag=1. As all the expressions using set analysis with Flag=1. List boxes has by default entire data from the data model. But Flag=2 is not relevent here as it the weeks related with it wont display anything hence seems misleading.

Can you please suggest better way to accommodate it?

@ Sunny - No we cant use straight table as the straight table wont enable us selections in green state. Also I want the functionality in the list box as we can separate the relates and unrelated weeks with respect to current selections.

Thanks

Please suggest

swuehl
MVP
MVP

Well, if the greyed out weeks are not relevant (Flag = 2), maybe remove them from your list box?

Use a field expression (select <expression> from field drop down on general tab), then enter something like

=If( Flag = 1, Week)

or

=Aggr( Only({1<Flag = {1}>}Week), Week)