Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
MatiasH
Contributor II
Contributor II

Selecting rows in a chart using a value present in multiple columns

Hello. 

I'm builinding a dashboard for ML models inventory.

I have a chart with a set of model features. Each row is a model and the colunms are the model's metrics or relevant characteristics: for example

|Model_name | model_auc | last_modification | top_feature1 | top_feature2 | top_feature3 |

What I need is to click on a value within the values of any of the "top_features" columns and select all rows (models) that contains the value in any of it's columns. So if two or more models share the same feature in any position (top1, top2, top3) would be selected.

I'm using a Vizlib chart with actions. But it seems to only select rows that have the value in the same column.

 

thanks in advance

 

Labels (2)
1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

Yes, absolutely! First you'd extract the relevant columns from the original column like this:

NewTable:
NoConcatenate Load
  Model_name, top_feature1, top_feature2, top_feature3
Resident Table1;

Then you create the cross table like this:

Cross: CrossTable(top_featuren, feature, 1) Load * Resident NewTable;

And finally delete the temporary "NewTable" to avoid a lot of synthetic keys:

Drop Table NewTable;

The result of the crosstable will be a table with three columns:

  • Model_name: Same values as from the original table.
  • top_featuren: A column whos values are the title of the column from which the features are taken.
  • feature: The feature value.

View solution in original post

7 Replies
Anil_Babu_Samineni

May be like this in selection, "Value*" - This work as wildcard search ..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MatiasH
Contributor II
Contributor II
Author

Hello Anil, thanks for your reply.
I need to click on the specific value of the chart and select all rows that have the value in any column. I'm not writing anything, just clicking. Where should I write that wildcard?

Anil_Babu_Samineni

By default it will capture the selections of entire column with the filter value. There won't be anything else which needs to be done..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MatiasH
Contributor II
Contributor II
Author

But I need the selection to cover multiple columns not just one.

Øystein_Kolsrud
Employee
Employee

The set of field values present is an intersection of the values available based on selections in different fields. What you are asking for is a union, not an intersection, so Qlik Sense simply doesn't work that way.

What you'd typically do in cases like this is to use a cross table to turn a table like this:

| Model_name | top_feature1 | top_feature2 | top_feature3 |
-----------------------------------------------------------
| M0         | F0           | F1           | null         |
| M1         | null         | F0           | F2           |

Into a table like this:

|Model_name | feature |
-----------------------
| M0        | F0      |
| M0        | F1      |
| M1        | F0      |
| M1        | F2      |

Once you have done that, then you can select F0 in the feature column (which contains all features for all models) and get the selection state I believe you are looking for.

MatiasH
Contributor II
Contributor II
Author

I understand now that is not possible in a table like the first one. But I need that table to stay as it is. So, maybe I can build this second table in the data model and then use the selection syntax to get the model ids from that table and use them to select items to display in the original table. Seems doable?

Øystein_Kolsrud
Employee
Employee

Yes, absolutely! First you'd extract the relevant columns from the original column like this:

NewTable:
NoConcatenate Load
  Model_name, top_feature1, top_feature2, top_feature3
Resident Table1;

Then you create the cross table like this:

Cross: CrossTable(top_featuren, feature, 1) Load * Resident NewTable;

And finally delete the temporary "NewTable" to avoid a lot of synthetic keys:

Drop Table NewTable;

The result of the crosstable will be a table with three columns:

  • Model_name: Same values as from the original table.
  • top_featuren: A column whos values are the title of the column from which the features are taken.
  • feature: The feature value.