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: 
Anonymous
Not applicable

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
Anonymous
Not applicable
Author

I did that...both the if statements does not work

OmarBenSalem

Works for me :

source:

Load*Inline [S.N,Status

2,Closed

1, Open

3,

];

dimension created

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


result:

Capture.PNG

Anonymous
Not applicable
Author

Ya...What if I have only status column:

Load*Inline [Status

Closed

];

and I have to show null for open data.

For this case, its only showing null not the closed data

OmarBenSalem

You can't create Null values out of an inline table; but if u had a table in ur db containing only status field; and it has null values

It will work

one of the 2 expressions I've shared with u.

ps1: It seems as if u don't want it to work lol

ps2: It's the WE,and 8pm where I am; can't stay any longer...

Hope I've helped.

Please mark the helpful answers as helpful and the correct answer as correct (if there is a correct one) to close the thread.

and ps: It's correct and maybe the only way to do it

Have a nice Weekend

Anonymous
Not applicable
Author

Lol..Thanks for ur help.DB does not have null values...It's either both open and closed or open only and closed only.

I was trying to forcefully create null if db has only open or only closed data

But really appreciate ur help Have a nice weekend u too..

zebhashmi
Specialist
Specialist

it can be simple as that

if(Status = 'Open' or Status = 'Closed', Status,'Null')

Anonymous
Not applicable
Author

Hey Jahanzeb,

It still shows closed only , it does not show null for open

OmarBenSalem

Stop it PLEASE !

I swear on my wife it will WORK once u have null values!

zebhashmi
Specialist
Specialist

Thank you for response. do you want to show Closed

and Null for both open and Blank am I, right?

if that may this

if(Status = 'Closed', Status,'Null')

zebhashmi
Specialist
Specialist