cancel
Showing results for 
Search instead for 
Did you mean: 

Isnull not working in calculated column of attribute

former_member224444
Participant
0 Kudos

Hello All,

I am trying to check Null value of the date field in calculated column of attribute view, but it is not working.

IF( isnull("TODATE"),'PRESENT','')

I am expecting 'PRESENT' in STATUS field if TODATE is null.

Thanks,

Rithika

Accepted Solutions (0)

Answers (6)

Answers (6)

0 Kudos

Hi,

I had the same problem.

What helped ?
-quotation of all the Elements with " in the formular
AND / OR
-no BLANKs in the isnull and if Clause

For ex:

IF(isnull("MT_SPLITTOBR"),1,"MT_SPLITTOBR") * "BT_AMOUNT" / "BT_ROWCOUNT"

Does not contain Blanks between the starting "IF" and the closeing bracket ")"

Best Martin

former_member208449
Active Participant
0 Kudos

Hello Rithika

Can you do a data preview with a filter on the TO_DATE field to get the null values?

Please let me know if you are able to see those rows having TO_DATE value as '?' after doing this.

0 Kudos

Please check data type of To_Date.

Regards,

Chintan

former_member224444
Participant
0 Kudos

Hi Chintan,

I use DATE type for the TODATE field for which am checking isnull.

Thanks,

Rithika

0 Kudos

First thing, if you are changing value of as string type , You need to change data type of To_Date column as varchar.

Or else You need to create another calculated columns which data type as VARCHAR and apply your formula, Let me know what is status.

Regards,

Chintan

anindya_bose
Active Contributor
0 Kudos

Your formula works perfect for me . Checked with different date fields, all works.

What is your HANA revision ?  I also tried another version, but could not find a problem .

if (  isNull ( daydate ( "DATE_SQL") ) ,'PRESENT','')

pfefferf
Active Contributor
0 Kudos

Hello Rithika,

please can you share your view definition? And on what SPS level you are working. Trying your expression on an SPS10 and SPS11 system works find for e.g. attribute and calculation views.

@Astrid: the space (if there or not) is not really relevant.

Regards,

Florian

former_member224444
Participant
0 Kudos

Hi Florian,

Below is the definition of attribute view.

And below is the base table definition.

Am doing this exercise in HANA Cloud not sure how to check SPS level in cloud platform.

Thanks,

Rithika.

anindya_bose
Active Contributor
0 Kudos

You can run SQL statement to know SPS revision  .


select VERSION from "SYS"."M_DATABASE";

Astrid_Gambill
Contributor
0 Kudos

have you tried removing the space between "(" and "isnull"