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

Create Custom Field During LOAD

I'm new to Qlik - so please bear with me as my question is a basic one, but I can't seem to find the right way.
During LOAD, I have it reading in a CSV file which is perfect. I want to create a new field on the fly based on the data as it loads in. Below is what I have:

LOAD Account,

     Product,

     Division,

     Amount

FROM

(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

So my goal is to create a new field called "Special" which populates with "Yes" if Amount is >=0.01, otherwise "No".

How do I do this?

1 Solution

Accepted Solutions
jer_2011
Creator II
Creator II

Hello,

you can try with this option

LOAD Account,

            Product,

            Division,

            Amount,

          If( Amount >= 0.01, 'Yes' , 'No' ) as Special

FROM (txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

hope it works

View solution in original post

2 Replies
jer_2011
Creator II
Creator II

Hello,

you can try with this option

LOAD Account,

            Product,

            Division,

            Amount,

          If( Amount >= 0.01, 'Yes' , 'No' ) as Special

FROM (txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

hope it works

Not applicable
Author

Thanks! Worked like a charm!