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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

How can I write an If statement for a Drop Field statement like this?

Hi all,

I am trying to write a query like below:

TableA:

LOAD

floor(RAND()*17)+10 as Test,

1 as Counter

AutoGenerate 23;

If($(vDropField)=1, Drop Field Counter, False);

Basically I want to drop the field is the vDropField variable contains 1, else don't drop the field.

It doesn't work when I write it. Any idea how to do this please?

31 Replies
swuehl
MVP
MVP

You're welcome.

If your request is resolved, then please close this thread flagging helpful and / or correct answers.

Qlik Community Tip: Marking Replies as Correct or Helpful

sunny_talwar

Second that