Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends, I have a dataset like below , whee A,B,C are column names and SalesQty,SalesValue,ReturnValue ,so on are data. Is it possible to add as column name SalesQty,SalesValue,ReturnValue by removing column names as A,B,C in Query.
A | B | C |
SalesQty | SalesVal | ReturnVal |
10 | 100 | 2 |
13 | 200 | 4 |
I want to remove column name A,B,C . New dataset will be
SalesQty | SalesVal | ReturnVal |
10 | 100 | 2 |
13 | 200 | 4 |
Is it possible in qliksense by writing query?
Hi,
You can actually "-" and "+" buttons to get rid of the extra headers:
As you can see Header size: 2 did the trick:
Hope this helps.
Other useful links by Sinan:
Thanks Dear,
but I am merging multiple sql files which is may not possible unselect or select in drop down list.
Is it possible to do in query??
Only I want to assign SalesQty,SalesValue.,ReturnVal as column name in Query.
Thanks,
Bibhuti
I am not quite sure about your data, but you can try something like the below:
You can use IsNum() function to get rid of string/text values and then rename the columns as you would like.
Hope this helps.
Try this.. this will automatically does it.
ColumnNames: //Just read Header and first row --- You can use "RowNum() in SQL instead of First
first 1
LOAD 1 as XYZ, //This is mandatory to work with crosstable -- just add this with rest of hte columns
A,
B,
C
FROM
test.xlsx
(ooxml, embedded labels, table is Sheet3);
Temp:
CrossTable(From, To)
LOAD XYZ,
A,
B,
C
Resident ColumnNames;
Drop Field XYZ;
RenameFields:
Mapping Load * Resident Temp;
Drop Tables Temp,ColumnNames;
Data:
LOAD A,
B,
C
FROM
test.xlsx
(ooxml, embedded labels, table is Sheet3) where RecNo()>1; // Dont read the first row as it has column names
RENAME Fields using RenameFields; //This will rename old column names with new one
Hi,
Try like this
LOAD
A as SalesQty,
B as SalesVal,
C as ReturnVal
FROM DataSource
WHERE A <> 'SalesQty';
Hope this helps you.
Regards,
Jagan.