2 Replies Latest reply on Nov 28, 2016 9:18 AM by Stephen Hellyar

# Combined Field Without Nulls

I have 2 dimensions that should be one.  So, I want to consolidate them.

Both are text fields.

Each field contains a Null where the other one contains a value.

So if Dimension 1 is Dog.  Dimension 2 is Null.  If Dimension 2 is CAT.  Dimension 1 is Null.

I created a simple calculation.

[Dimension 1]+[Dimension 2]

But using the Dog and Cat example the result looks like:

DogNull

NullCat

How do I get the calculation to ignore the Nulls and print the result?

Dog

Cat.

Combined Field does not solve this.  It generates

Dog, Null

Null, Cat

• ###### 1. Re: Combined Field Without Nulls

Are you sure they are actually null and not a string with the word "Null"?

If they are actually null, create a calculated field called CombinedDim with the following formula IFNULL([Dimension 1],[Dimension 2]).

If they just contain the word null, I'd create a calculated field as follows IF [Dimension 1] = "Null" then [Dimension 2] else [Dimension 1] END

• ###### 2. Re: Combined Field Without Nulls

I switched them from true nulls to string nulls.  Thanks, both approaches worked.