cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated Column in Calculation View

NidhiDeep
Explorer
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200930
Participant
0 Kudos

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

lucas_oliveira
Advisor
Advisor
0 Kudos

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