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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

How to supress NULL values in Text Object


Hi All,

I have 3 fields Trainer, Trainee and Hours.

I am displaying all these fields in Text Object Using following expression:

=Concat(Trainer & '--' & chr(32) &

Trainee & '--' & chr(32) &

  Hours &

chr(13) & chr(13))

and it is working fine as I want but for some Trainee, Trainer is null so it is showing result like this:

-- Trainee1 -- 25

-- Trainee4 -- 30

My requirement is, I dont want to show those records where Trainer is not availabe. If I used any chart then simply we need to select Trainer dimension and then need to check "Suprees Null" but as per my requirement I need to display this in Text Box object only.

Please help me how to supress null values for Trainer as per above expression.

Thanks,

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Something like:

Concat(If(Len(Trainer) > 0, Trainer & '-- ' & Trainee & '-- ' & Hours), chr(13) & chr(13))

(chr(32) is a space, so I have included it in the literal strings)

test.png

(Cannot upload app from here due to client security policies)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

11 Replies
PrashantSangle

Hi,

Use If()

If(not isnull(Trainee),YourExpression)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
soha1902
Creator
Creator
Author

Its not working.

Not applicable

if(not IsNull(Trainee),

(

Concat(Trainer & '--' & chr(32) &

Trainee & '--' & chr(32) &

  Hours &

chr(13) & chr(13))

))

prajapatiamar38
Creator II
Creator II

Hi,

Please find the attached Qvw below.

jonathandienst
Partner - Champion III
Partner - Champion III

Something like:

Concat(If(Len(Trainer) > 0, Trainer & '-- ' & Trainee & '-- ' & Hours), chr(13) & chr(13))

(chr(32) is a space, so I have included it in the literal strings)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
soha1902
Creator
Creator
Author

Hi,

As per your example I want following output:

img.png

Like this image, I want to display all the records in Text Object, where I need to remove first record because its not showing trainer name.

PrashantSangle

Hi,

Use

If(not isnull(Trainee) or not IsNull(Trainer) or not IsNull(Hours),YourExpression)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

Something like:

Concat(If(Len(Trainer) > 0, Trainer & '-- ' & Trainee & '-- ' & Hours), chr(13) & chr(13))

(chr(32) is a space, so I have included it in the literal strings)

test.png

(Cannot upload app from here due to client security policies)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
prajapatiamar38
Creator II
Creator II

Hi,

Do same as jonathan dienst is suggesting i think it is correct.