Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

If loop in Tabelle

Hello everyone 

I want to write an if loop in the script:

if there is no value in the second column "age" of the table below, the fifth column must be empty or #NULL! stay.

12.png

if (age=0 , DRG=#NULL!)

I'm not so sure if this previous condition is enough.


I would be grateful for any answer 🙂

Labels (1)
  • Other

3 Replies
MendyS
Partner - Creator III
Partner - Creator III

Hi @Anonymous 

try to do that in the data load editor, 
TeableName:

No Concatenate

Load *, if ( age>=0, fifthColumnName) As fifthColumnNameTemp

Resident ...

Drop Field fifthColumnName;

Rename fifthColumnNameTemp to fifthColumnName;

Anonymous
Not applicable
Author

Thanks for the answer


I didn't mention that the screenshot is a script.

The goal is:
There is no need to write a value in DRG if there is no age.

It is not exactly about renaming, but about change the value in #NULL!.

MendyS
Partner - Creator III
Partner - Creator III

@Anonymous 

yes, I know.

what I write gives you null if there is no value in the age field (if the age is small from 0, the field returns Null).