Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
dinicholls
Contributor II

Null / Blanks in Excel Import

Hi,

I have a field I'm pulling in from excel, 'Group No':

     Upper(if([Group No]=0,'GR-000000',

     if([Group No]='','GR-000000',[Group No]))) As [Group No],

The problem is, that if the field is blank in excel, I want to populate it with 'GR-000000'.

I've tried '', as you can see from above, with no luck.

Its producing a line in my pivot table with a - where the GR number should be.


How can I replace any 'blanks' with 'GR-000000'?


Thanks


Di


1 Solution

Accepted Solutions
MVP
MVP

Re: Null / Blanks in Excel Import

If(len([Group No]) = 0, 'GR-000000', Upper([Group No]) as [Group No],


or

If(len(Trim([Group No])) = 0, 'GR-000000', Upper([Group No]) as [Group No],

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

Re: Null / Blanks in Excel Import

If(len([Group No]) = 0, 'GR-000000', Upper([Group No]) as [Group No],


or

If(len(Trim([Group No])) = 0, 'GR-000000', Upper([Group No]) as [Group No],

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
trdandamudi
Honored Contributor II

Re: Null / Blanks in Excel Import

Try below:

If(Len(Trim([Group No])>0), [Group No],'GR-000000'))) As [Group No]