Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

Calculated attribute formula issue

$
0
0

Hi Team,

 

I have a issue on creating calculated attribute under calculation view (graphical). My data in the table looks like this,

 

Column A   Column B     Column C

 

AB00         0000723400      RD134567

AB00         0000625001      RD345671

CSS          0000623400       CSS

ID00          0000654213      ID0000045

DM00        0000720001       DM000654

 

and to determine column D, the logic as follows,

if Column A = 'AB00' and Column B = '723400' then 'NA'

       elseif Column A != 'AB00' or Column A ! = 'CSS' or Column A ! = 'ID00' or Column A != 'DM00' then 'NA'

       else Column C

 

and calculated attribute formula in the view,

 

if("Column A" != 'AB00' OR "Column A" != 'CSS' OR "Column A" != 'ID00' OR "Column A" != 'DM00','NA',if("Column A" = 'AB00' AND "Column B" = '0000723400','NA',"Column C")) - Result is not correct!

 

result displayed as

 

Column A     Column B          Column C        Column D

 

AB00          0000723400      RD134567      NA

AB00          0000625001      RD345671      NA

CSS           0000623400       CSS              NA

ID00           0000654213      ID0000045      NA

DM00         0000720001       DM000654      NA

 

Without using OR condition,

 

if("Column A" != 'AB00','NA',if("Column A" = 'AB00' AND "Column B" = '0000723400','NA',"Column C")) - Result is correct!

 

result displayed as

 

Column A   Column B     Column C        Column D

 

AB00         0000723400      RD134567      NA

AB00         0000625001      RD345671      RD345671

CSS          0000623400       CSS              NA

ID00          0000654213      ID0000045      NA

DM00         0000720001       DM000654     NA

 

Nested IF condition,

 

if("Column A" != 'AB00', 'NA', if("Column A" != 'CSS','NA',if("Column A" = 'AB00' AND "Column B" = '0000723400','NA',"Column C"))) - Result is not correct!

 

result displayed as

 

Column A     Column B          Column C        Column D

 

AB00          0000723400      RD134567      NA

AB00          0000625001      RD345671      NA

CSS           0000623400       CSS              NA

ID00           0000654213      ID0000045      NA

DM00         0000720001       DM000654      NA

 

I would like to know the reason for the failure behind OR and nested if statements. Appreciate your help or input on this issue and I'm using HANA revision 82.

 

Thanks

Sathish


Viewing all articles
Browse latest Browse all 4343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>