Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
VTep
Contributor
Contributor

Create a dropdown containing distinct values from a list of list

Hello,

I have a table where each row is a mechanical part.

This table contains a column called MSN_list. For each row, the value in MSN_list is a list of machines in which this part is used (see screenshot).

For instance, assuming my table has 2 rows:

  • On row 1, the value in MSN_list might be: [1, 2, 3]
  • On row 2, the value in MSN_list might be: [2, 3, 4]

My goal is to create a filter that would let me choose between all distinct array items and then filter the rows where the array contains this value.

So in my case:

  • The filter would offer me: 1 / 2 / 3 / 4 as options
  • If I were to pick 1, only row 1 would be selected.
  • If were to pick 2 or 3, both rows would be selected.
  • If I were to pick 4, only row 2 would be selected.

Can you please help?

Thanks a lot!

Labels (1)
5 Replies
Xolink1389
Creator
Creator

ok you need use, the variable input funtion this will allow you to create a dropdown,

Captura de pantalla 2022-12-01 132803.png

you will just need to put a variable on it, in this case you must put the value of column in a variable and make it as dynamic in order to use the drop down,

Captura de pantalla 2022-12-01 133255.png

VTep
Contributor
Contributor
Author

Hi Xolink,

 

Thank you for your quick reply!

However, I think your reply assumes each row has a distinct value. It doesn't. Each row (i.e. mechanical part) has a value in the column MSN_list that is itself a list of machines in which this part is used.

So

on row 1, the value of MSN_list is: [1, 2, 3]

on row 2, the value of MSN_list is: [1, 2, 3, 4]

I think I need to do 2 things:

1 - create a list of distinct machines: in our example, that would be 1,2,3,4. Should I do this step in my data preprocessing or can I do it directly in qliksense?

2 - use this list of distinct values in a dropdown; picking a value in the dropdown will filter the values in MSN_list to select all lists that contain the picked value. (is it possible?)

 

Thanks again for your help!

VTep
Contributor
Contributor
Author

Hello again. Let me try to clarify further:

VTep_0-1670342482183.png

On the left is a column containing lists. Each list is attached to a mechanical part. The mechanical part on row 1 is used in the machine 306 and in the machine 315.

 

On the right is a column containing unique distinct values from these lists. For instance, the value 306 appears only once.

 

My goal is to create a dropdown menu that lets the user pick a value from the column on the right, and then immediately filters the column on the left to display all rows whose list contains this value.

 

Thanks!

Xolink1389
Creator
Creator

ok, puedes intentar esto, crear una variable donde concatenes los valores de la izquierda con la derecha, luego esa variable la pones en un panel de filtrado

Xolink1389_0-1670352908576.png

Xolink1389_1-1670353034282.png

 

, también te podrías ayudar usando una tabla pivotante

VTep
Contributor
Contributor
Author

Hello Xolink1389,

Thank you again for your reply.

What you suggested - creating a table where each individual value is matched to all lists in which it is contained - is a workaround I cannot use in my specific case because I have lots of very long lists. This means my joined table would have several million rows.

I'd rather be able to automatically pass a variable to a filter, if this is possible. Maybe the filter can listen for changes in the variable's value, and update itself accordingly?

 

Thanks,