Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Kelliesy
Contributor III

Using a Coalesce in a Variable Input value

We have two tables that cannot be joined that we need to coalesce the "source" field.  This needs to be done so that it can be used in a variable input value but it doesn't work.  All our other fields work find in the variable input values except this coalesce.  Here is an example of what we have tried;

Coalesce(o.source, l.source) 

also tried alt(o.source,l.source)

Both work fine as a Master Dimension item but since you cannot use Master items in variable input values we have been writing the formula in the value field.  Both show as okay but gray out and do not display any values.  

Labels (2)
2 Replies
rubenmarin

Hi, I'm not sure to follow how are you doing that. Can you upload a simple sample that demonstrates the issue?

If you set o.source and l.source separated, any of them returns a value?

Btw, Alt is for numbers, if source can be a string, you'll need Coalesce

Qrishna
Master

Coalesce(o.source, l.source) - this works as a dimension as it is behaving like regular a field that has n number of field values. As you know you cannot store the field inside a variable, i belive it would be showing a null value as you are trying to store a field inside a variable. Varaible always takes a single field value/expression that can lead to value only. so make sure Coalesce(o.source, l.source) returns a value while storing in a variable.