Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Generating data in a load statement

Good morning All,

I was wondering if someone could assist with how I could adjust my load statement so that it replaces certain values in a field when doing the upload. I have a field which has contains the values Poor, Good, Average and "-". The "-" represents a situation where an evaluation hasn't yet been done. I would like to replace this "-" with some text, "Incomplete". How would I add this to the upload statement, say the field is called 'Assessment'.

Thank you

Herbiec09

1 Solution

Accepted Solutions
Not applicable
Author

If the field's name is Assessment,

in the load script:

Load

if( Assessment='-','Incomplete',Assessment) as Assessment,

field2,

field3,

...

from table ;

Hope this helps

MC

View solution in original post

4 Replies
Not applicable
Author

If the field's name is Assessment,

in the load script:

Load

if( Assessment='-','Incomplete',Assessment) as Assessment,

field2,

field3,

...

from table ;

Hope this helps

MC

PrashantSangle

Hi,

Try this,

Load *,

if( Assessment='-','Incomplete',Assessment) as NewAssessment

from table;

Use NewAssessement for use

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Perfect solution, many thanks

Much appreciated

MK_QSL
MVP
MVP

Something like this?

Temp:

Load * Inline

[

  Product, Quality

  A, Good

  B, Good

  C, Poor

  D, Average

  E, -

  F, -

  G, Average

  H, Poor

  I, -

  J, Average

];

NoConcatenate

Final:

Load

  Product,

  If(Quality = '-','Incomplete', Quality) as Quality

Resident Temp;

Drop Table Temp;