Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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!