Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Grouping/categorizing columns within script

Hello community,

on the left side in the image you can see my Excel file. The database table is the same except that I don't have the "Category 1", "Category 2" column headers.
I want to group these using Qlikview - see the small table on the right. So that I can select Category 1 and I only get Col1 to Col3 values.

example.PNG

Can I group the different colums in the load stmt? Do I need to transform the colums to field values.

Hope you can help me out here.

Thank you.

2 Replies
Gysbert_Wassenaar

You can use the crosstable function to load the data and create another table for the categories. You may have to change the headers in the excel file so that all the headers are on the same row, i.e. moving Plant, Year and Month a row down instead of using merged cells.

Table1:

Crosstable(Col, Value,3)

load Plant, Year, Month, Col1,Col2,Col3,Col4,Col5,Col6

from ...myexcelfile...;

Table2:

Load * inline [

Category, Col

Category1,Col1

Category1,Col2

Category1,Col3

Category2,Col4

Category2,Col5

Category2,Col6

];


talk is cheap, supply exceeds demand
Not applicable
Author

thanks for your reply. Notice that I don't use the Excel file within QlikView. I'm using a database table but without the Category headers.

I only need these Category names for grouping.

Check out the attached sample.