Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mkudis
Contributor II
Contributor II

Table based on value of a field

I have a set of tables that I am looking to create, but each table will have different columns based on the value of field 'groupname'.  We have items with different attributes (color, profile, thickness, width, length, style, etc), but these attributes only apply to some of the groupnames.  For instance, groupname A might only have values in color, thickness, and width, but groupname B might only have values in color, profile, style, and groupname C might only have values in thickness, width, and length.  

I want to be able to do different tabs/tables for each groupname, so theres not a bunch of blank columns if that groupname doesn't have values in an attribute, but am struggling with how to control the data in this way.  Is it a calculated dimension?  calculated condition?

So groupname A table should be something like

item     color     thickness    width

Groupname B table should be something like

item     color     profile     style

Groupname C table should be something like

item     thickness     width     length

 

I know I can build out the dimensions (item, color, thickness, width, etc) any way I want, its the controlling what items show up based upon groupname that I am struggling with.  Also want to add that there are no calculations being done here, its basically just a data table returning values.

2 Replies
marcus_sommer

I think the creation of such multiple and quite similar tables makes more difficulties as it solved. I believe I would keep them within a table-structure like:

GroupName   Item   Attribute   Value
a                             x          color           red

If this isn't really practicably you may consider to use a generic load approach like described here:

The Generic Load - Qlik Community - 1473470

- Marcus

mkudis
Contributor II
Contributor II
Author

Thanks for the suggestion, I'm using generic loads on some of the data already due to how our database is structured with this information.  I just figured there should be some way to say I want to build a table with only data where Groupname is A.  Then abother table with only data where Groupname is B.  And so forth and so on.  Seems to be an easy enough ask within a data set as to not have to create a bunch of different tables on LOAD.