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

Replacing Null text values with a value

Hi -

I am trying to replace blank text field values using the following expression.

=if(WildMatch([Text],'*NULL*'),'Testing',[Text])

For some reason this formula does not work and blank rows were not replaces with 'Texting'.

Please help.

Thank you!

12 Replies
alexandros17
Partner - Champion III
Partner - Champion III

try this

if(isnull(text), 'Testing', text)

Not applicable
Author

It doesnt work. Any other options?

arbernardez
Partner - Contributor III
Partner - Contributor III

if(len(trim(text))=0, 'Testing', text)

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

HI Zhenya,

It may be that these are not null values on a row (where the if(isnull syntax would work) rather places where there are no values due to associations between tables not joining up?

In these cases you can't easily populate values, but there are usually ways around it.

Can you please give a bit more detail about your data model and where you want the Nulls replaced?

Steve

Not applicable
Author

hi,

     try this,

          if(IsNull(Text) or Text= '', 'Testing', Text)

Regards,

Ashutosh

sujeetsingh
Master III
Master III

Steve you are right man it is the data model issue  and hence need to handle in script.

Anonymous
Not applicable
Author

Hi Sujeet,

Can you explain how to handle this scenario in script?

Thanks,

Sandeep

Anil_Babu_Samineni

One option could be this?

Set Nullinterpret = 'NULL';

NullasValue *; // You can define the fields

Set NullValue = 'Testing';

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vardhancse
Specialist III
Specialist III

Hi,

Can try this:

In chart Expression:

=IF(Len(Trim(Dim))=0,'N/A',Dim)

Even in script also we can use