Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Re: Replacing Null text values with a value

try this

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

Not applicable

Re: Replacing Null text values with a value

It doesnt work. Any other options?

arbernardez
New Contributor III

Re: Replacing Null text values with a value

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

MVP
MVP

Re: Replacing Null text values with a value

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

Re: Replacing Null text values with a value

hi,

     try this,

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

Regards,

Ashutosh

sujeetsingh
Honored Contributor III

Re: Replacing Null text values with a value

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

kothakas
New Contributor III

Re: Replacing Null text values with a value

Hi Sujeet,

Can you explain how to handle this scenario in script?

Thanks,

Sandeep

Highlighted

Re: Replacing Null text values with a value

One option could be this?

Set Nullinterpret = 'NULL';

NullasValue *; // You can define the fields

Set NullValue = 'Testing';

vardhancse
Valued Contributor II

Re: Replacing Null text values with a value

Hi,

Can try this:

In chart Expression:

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

Even in script also we can use

Community Browser