Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Aditya_Chitale
Specialist
Specialist

Dynamically load last 12 columns from excel

Hi All,

I have an excel spreadsheet in which I store month wise data. Each month has 12 columns. Every next month, 12 columns get appended to the previous 12 columns (Data gets appended horizontally).

Is there any way to pick only last 12 columns in Qlik Sense so that I can get data for latest month?

Regards,

Aditya

Labels (5)
1 Solution

Accepted Solutions
Aditya_Chitale
Specialist
Specialist
Author

Thanks for your reply. But I solved this requirement by automating the numbers appended behind field names.

For eg I have fields A, B, C. If the same fields are loaded for next month, They  will  be loaded as A2, B2, C2. So I automated the numeric part by using foll way:

PrevVar:    // Previous month stored qvd
load
VarName,VarCount
i,1
from [lib://xyz_Nov22.qvd];

let vCurrVar=peek('VarCount',0,'PrevVar')+1;

Then I stored above table in qvd form for using values for next month (Stored for Dec 22). And also used above variable 'vCurrVar' as a suffix in the field names of my table.

 

Regards,

Aditya

View solution in original post

2 Replies
Aditya_Chitale
Specialist
Specialist
Author

Thanks for your reply. But I solved this requirement by automating the numbers appended behind field names.

For eg I have fields A, B, C. If the same fields are loaded for next month, They  will  be loaded as A2, B2, C2. So I automated the numeric part by using foll way:

PrevVar:    // Previous month stored qvd
load
VarName,VarCount
i,1
from [lib://xyz_Nov22.qvd];

let vCurrVar=peek('VarCount',0,'PrevVar')+1;

Then I stored above table in qvd form for using values for next month (Stored for Dec 22). And also used above variable 'vCurrVar' as a suffix in the field names of my table.

 

Regards,

Aditya