Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

IF or CASE Statement

$
0
0

I have a Calculated Column I am trying to create in a Calculation View where I am using an IF Statement to calculate Day Buckets based on a Decimal Column called DAYS with the Syntax below;

 

if("DAYS"<1.5,'Less than 1 day',

 

if("DAYS"<3.5,'Less than 3 days',

 

if("DAYS"<5.5,'Less than 5 days',

 

if("DAYS"<7.5,'Less than 7 days',

 

if("DAYS">=7.5,'> 7 days',

 

'No Info Provided')))))

 

Currently this logic is only returning results as '> 7 days', and the DAYS Column definitely has numbers below 7.5 in my data, so all of the other Text Fields should be getting populated with results.

 

Is there any reason why this would be the case? Would I need to change the logic to a CASE Statement instead, or convert the DAYS Column from a Decimal to something else?


Viewing all articles
Browse latest Browse all 5653

Trending Articles



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