Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

How can I delete a column based on a condition?

Hi,

Loading an Excel file, I have a column that, depending on the contents (or rather lack of), needs to be removed.

I can go the strange way of transposing the table (since in my case it's always the first column that's under the question) and deleting what is now the row. But I would like to know, in general, if I need to delete a column based on value(s) in it, how would I go about doing that?

Thank you,

Siarhei

1 Solution

Accepted Solutions
MVP
MVP

Re: How can I delete a column based on a condition?

You can use DROP FIELD to actually remove a column completely after you've loaded it.  Wrap it in an IF block to conditionally drop the field.

If you just mean removing the value based on a condition:

if(condition, value) as value

Only in the given condition will value be filled in.  Otherwise the value in the column will be null.

1 Reply
MVP
MVP

Re: How can I delete a column based on a condition?

You can use DROP FIELD to actually remove a column completely after you've loaded it.  Wrap it in an IF block to conditionally drop the field.

If you just mean removing the value based on a condition:

if(condition, value) as value

Only in the given condition will value be filled in.  Otherwise the value in the column will be null.