Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
adammuq
Contributor
Contributor

How to Create a table of column names from another table

I have 69 fields from 8 sheets. I want to create a new table ('FIELDS') that has 1 column only, containing the names of those 69 columns. I want  a table with 1 column containing 69 fields.

ive tried from https://community.qlik.com/t5/QlikView-App-Dev/Create-a-table-of-column-names-from-another-table/td-... but didnt seem to work.

pls dont refer me to any solved solution with other data as i am still new with qlik sense.

here are 2 sheets of my data example

LOAD
negeri as nationality,
tarikh as date,
jumlah as total,
jumlah_baharu as newtotal
FROM [lib://newcovid19/new_covid19_updated_compile.xlsx]
(ooxml, embedded labels, table is format_negeri);

LOAD
No.,
"Case Number",
"Date",
"Death Time",
Name,
"NO IC",
Gender,
"Age",
Nationality,
Race,
"Area - tempat tinggal",
"Hospital1 - admitted",
State1,
"Hospital2 - kematian",
State2,
Cluster,
NoCluster,
"Early Symptom",
"Early Symptom Datetime",
"Date Admitted to Hospital",
"Date Postive COVID-19",
"History of Disease",
Remarks
FROM [lib://newcovid19/new_covid19_updated_compile.xlsx]
(ooxml, embedded labels, table is by_death);

1 Reply
marcus_sommer

Quite similar to your tried approach but much easier ...

load fieldname(recno(), 'YourTable') as Field autogenerate nooffields('YourTable');

- Marcus