Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
markgraham123
Contributor II

Eliminate Null value

Hi all,

I'm trying to eliminate the null value if the filed has value in it.

Eg:

If ID has Code values null and XK

Then i want to eliminate null and display only XK so as to avoid one extra line which is duplicating the records

Please see the attachment.

Tags (1)
7 Replies
trdandamudi
Honored Contributor

Re: Eliminate Null value

You can get rid of the nulls in the script like attached:

MVP
MVP

Re: Eliminate Null value

You code shows no NULL, but empty values.

Besides this, if you want to filter your table to only show lines where code is not empty or NULL, you can't use a table box. Instead use a table chart with a calculated dimension or set analysis in all your expressions like

=Only({<[Code 1] = {'XK'}>} [Code 1])

=Only({<[Code 1] = {'XK'}>} [Code 3])

=Only({<[Code 1] = {'XK'}>} [Code 4])

=Only({<[Code 1] = {'XK'}>} [Code 5])

Re: Eliminate Null value

Mark -

If what Stefan and Thirumala provided did not work, would you be able to elaborate what you are trying to do? I am not sure I completely understand the issue that you are facing right now.

Best,

Sunny

trdandamudi
Honored Contributor

Re: Eliminate Null value

Stefan,

Is it not the Expressions has to be as below:

=Only({<[Code 1] = {'XK'}>} [Code 1])

=Only({<[Code 3] = {'XK'}>} [Code 3])

=Only({<[Code 4] = {'XK'}>} [Code 4])

=Only({<[Code 5] = {'XK'}>} [Code 5])


Unless  I am missing something here..


Note: I learn a lot from your postings and Sunny. You guys are great and really appreciate for helping others. I do my bit as time permits.Keep up the good work.


MVP
MVP

Re: Eliminate Null value

You are not missing something, except a more detailed explanation of what the OP really wants to do and how his settings looks like.

I assumed that he wants to check Code1 for a special value and suppress all other lines. If he wants to check all codes for certain values, he needs to adapt.

I don't really know what he wants to do. I just wanted to show a possible approach using a straight table instead of a table box and calculated dimension / set analysis in expressions.

trdandamudi
Honored Contributor

Re: Eliminate Null value

Thank you.

florentina_doga
Contributor III

Re: Eliminate Null value

try this

Community Browser