Skip to Content
avatar image
Former Member

Calculated Column in Calculation View

Hi All,

I have a very simple requirement in which I need a calculated column based on the two column value in the table .

so in simple SQL logic it will be something like this:

if("column1= 1" AND "column2" = 2)

then calculated column is sum (column 3 , column4)

Regards

Deep

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 30, 2015 at 10:13 AM

    Hi Deep,

    Not sure what's missing here. Syntax would be: if("column1= 1" and "column2" = 2, "column3"+"column4",0). Documentation here:

    Miscellaneous Functions - SAP HANA Modeling Guide for SAP HANA Web Workbench - SAP Library

    Watch out for differences between 'if' and 'jf', explained in the same page.

    BRs,

    Lucas de Oliveira

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2015 at 09:31 PM

    Hi Nidhi,

    Please use following formula in calculated column window.

    Datatype : Integer

    Column Type : Measure

    Formula :

    if("coumn1"=1,if("column2"=2,"coumn3"+"coumn4",0),0)

    Logic : when both condition will be tru then it will add column3 and column4 else it will return zero.

    I hope, this will help you.

    Regards,

    Vikram

    Add comment
    10|10000 characters needed characters exceeded