Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

loveqliksense
New Contributor III

Making column Null

Hi All,

I have a column in db status.

Status:

Load*Inline [S.N,Status

1,Open

2,Closed

];

For the filter in the visualization, if any of the data open or closed not available ,I have to display as it is null without making any change in script.Because filter will show only open or closed.

Is it possible?

Thanks

20 Replies
omarbensalem
Esteemed Contributor

Re: Making column Null

Maybe create a new filter in ur sheet as follow:

aggr(if(len(trim(status))=0,'Null',Status),status)

or

aggr(if(isnull(status)=-1,'Null',Status),status)

loveqliksense
New Contributor III

Re: Making column Null

For first one I commented open in my script and checked...It does not show null

Second one it does not work at all

dverbeke
Contributor III

Re: Making column Null

You can't select null values in a visualization.

Best is to replace them in the script with a known value.

Changes in the front-end are usually slow.

Edit:

It is best practice to join your tables in the script, so that you can identify where the nulls are...

Kind Regards,

Dion

omarbensalem
Esteemed Contributor

Re: Making column Null

How did u comment it???

loveqliksense
New Contributor III

Re: Making column Null

Status:

Load*Inline [S.N,Status

2,Closed

];

//1,Open

This is what I wrote ..I wanted to see closed and null in filter for open. I cannot do from script

dverbeke
Contributor III

Re: Making column Null

Is it possible to send an example document?

We can help if we can see what you want to do.

Kind Regards,

Dion

omarbensalem
Esteemed Contributor

Re: Making column Null

This is not equal to saying not available !

Try as follow:

Status:

Load*Inline [S.N,Status

2,Closed

1,

];

and then try the expressions.

This is a real use case of "Status not available"

loveqliksense
New Contributor III

Re: Making column Null

I commented to check....I cannot do anything from script...I have to show forcefully null to open or closed if database does not have it.

omarbensalem
Esteemed Contributor

Re: Making column Null

Yes I know;

but to check this, u have to do as I told u;

if there is no status in ur db it translates to this :

Load*Inline [S.N,Status

2,Closed

1,

];

not to :

Load*Inline [S.N,Status

1,Open

];

//2,Closed