Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a listbox with two values A & B. I would like like to create another listbox based on the value A or B that I select in the first listbox.
Can you please help me with a solution for these?
You can simply try expression like:
If( listbox1='A', 'Selected A', If( listbox1='B', 'Selected B'))
Or, if you are looking for something else, I suggest to explain your expectation in more detail.
Hello,
Please see screenshot below below and qvw attached. I hope this may help you.
EDIT - added Alternative
Alternative:
Hello,
I tried the solution you mentioned but it doesn't seem to be working. I'll explain what I need in more detail.
I have a listbox called CITYwith two values A_CITY and B_CITY. In my data there are two columns by the name A_CITY and B_CITY. If I select the value A_CITY in the listbox CITY; I want a listbox called A_CITY to be created. When I select B_CITY the listbox A_CITY should disappear and listbox B_CITY should be created.
Hello,
What you have mentioned is selecting a value in a listbox based on the value of another listbox. What I need is that the entire listbox should be created based on the value of another listbox.
In your example; based on value selected in Dim1 the listbox Dim2 should be created.
Hi,
one solution might be an island table for the field selector and a listbox expression using dollar sign expansion to generate the field name:
tabCITY:
LOAD * INLINE [
CITY
A_CITY
B_CITY
];
tabABCITY:
LOAD * INLINE [
A_CITY, B_CITY
A_CITY1, B_CITY1
A_CITY2, B_CITY2
A_CITY3, B_CITY3
A_CITY4, B_CITY4
A_CITY5, B_CITY5
A_CITY6, B_CITY6
A_CITY7, B_CITY7
A_CITY8, B_CITY8
A_CITY9, B_CITY9
A_CITY10, B_CITY10
];
see also:
The Magic of Dollar Expansions
hope this helps
regards
Marco
another solution could be:
tabABCITY:
LOAD RecNo() as ID, * INLINE [
A_CITY, B_CITY
A_CITY1, B_CITY1
A_CITY2, B_CITY2
A_CITY3, B_CITY3
A_CITY4, B_CITY4
A_CITY5, B_CITY5
A_CITY6, B_CITY6
A_CITY7, B_CITY7
A_CITY8, B_CITY8
A_CITY9, B_CITY9
A_CITY10, B_CITY10
];
tabCITY:
CrossTable (CITY, CITY_Value)
LOAD * Resident tabABCITY;
hope this helps as well
regards
Marco
Hi Marco,
I tried this option and it works. However; there's a rider to it.
There is one more table with fields REGION & CITY. The regions are X,Y,Z.
In the lisbox that I am creating dynamically along with =$(=CITY) I also want to only show the corresponding city values that I select for REGION = X. Can you please help me with this?
Regards,
Ayandeep
maybe like this?
tabCITY:
LOAD * INLINE [
CITY
A_CITY
B_CITY
];
tabABCITY:
LOAD * INLINE [
A_CITY, B_CITY, Region
A_CITY1, B_CITY1, X
A_CITY2, B_CITY2, X
A_CITY3, B_CITY3, X
A_CITY4, B_CITY4, Y
A_CITY5, B_CITY5, Y
A_CITY6, B_CITY6, Y
A_CITY7, B_CITY7, Y
A_CITY8, B_CITY8, Z
A_CITY9, B_CITY9, Z
A_CITY10, B_CITY10,Z
];
hope this helps
regards
Marco
please close your thread if your question is answered:
Qlik Community Tip: Marking Replies as Correct or Helpful
thanks
regards
Marco