Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to add a column and store it

Hello qlikers 🙂 ,

I am loading a qvd file. After this qvd file I want to write a new column to it and store it.

User:
LOAD
    "ID",
    User,
    "Time",
    "End Time",
FROM [lib://User.qvd];

// Add new column
// for example
// ID = $(vIDNew)
//...
Store IT User into UserNew.qvd (qvd);

How could I add a new  column  with values and add it to the table user and store it finally?

Thank you in advance! Looking forward to reading some answers. 🙂

Labels (3)
1 Solution

Accepted Solutions
kashyap
Partner
Partner

Hi

 you can use inline load instead of creating  variables for the user, id 

create variables only for the time and end time

if you want constant use set else to use let to update new every time you load the data

Let / Set  Time = Now()
Let / Set  EndTime = Now()

Concatenate(User)

Load * Inline [

ID, User, Time, EndTime

5, 'Testname',$(Time ),$(EndTime )];

Hope this helps

Thanks

View solution in original post

3 Replies
kashyap
Partner
Partner

Hi

Can u please elaborate what value do u want to insert into new column and data is coming from excel or which source?

Thanks

Anonymous
Not applicable
Author

Thank you for your answer!

Dats is coming from a qvd, it was excel but I store it as a qvd. A csv file would match also. 

This would be data: 

ID = '5'
SET vUsername = 'Testname'
User = $(vUsername)
Time = Now()
End Time = Now()

Is the information enough for you ? Please let me know! Thank you in advance! 🙂

kashyap
Partner
Partner

Hi

 you can use inline load instead of creating  variables for the user, id 

create variables only for the time and end time

if you want constant use set else to use let to update new every time you load the data

Let / Set  Time = Now()
Let / Set  EndTime = Now()

Concatenate(User)

Load * Inline [

ID, User, Time, EndTime

5, 'Testname',$(Time ),$(EndTime )];

Hope this helps

Thanks

View solution in original post