Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calculated column and null values

Hi folks,

I have a fairly simple formula for a calculated column.  I have a field called Flag and it can contain either 'Yes', 'No', or null.  My calculated measure is simply trying to label both 'No' and null results as 'N' like this;

if("Flag" = 'Yes', 'Y','N')

So my interpretation of this formula is that anytime the Flag is set to Yes then place a Y else for every other case (such as 'No' or null) it should just put 'N'.  It is successfully converting Yes to Y and No to N but it leaves nulls as '?' instead of converting them.

Is this a bug?  My Flag field is the result of an outer join with other tables and it's almost as though the calculated column is being calculated BEFORE all of the joins are occurring.  Any suggestions?

Thanks,

-Patrick

replied

Hi Patrick,

I always look forward to post from you. They are quite interesting..

Can you please try the following:

if(isnull("Flag"), 'N', if("Flag"='Yes', 'Y', 'N'))

Regards,

Ravi

2 View this answer in context
Not what you were looking for? View more on this topic or Ask a question