Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading columns/fields with dynaminc names into new table

Hello QV Experts!

I am trying to load into table field from other table, where name of columns are definefd by variable.

So we have in one table columns with year&month:

Capture.JPG

then I made loop to catch all columns from "Source_Table" and put them into "Base" table

for i = 1 to 16 //we have 16 columns to check

    let Name = FieldName($(i),’Source_Table');

         Left join(Base)

     load
         
Plant,
         
Material,
         
$(Name) as $(NowYear)$(i)
         
Resident Source_Table;

next i


But as result I got:

Capture.JPG


Any ideas how to import all values instead of only field names?

Thanks!

1 Reply
Gysbert_Wassenaar

Are you perhaps looking for the CrossTable load?


talk is cheap, supply exceeds demand