Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

How to case function in Calculated Column in Graphical Calculation View?

$
0
0

Hi,

 

I need to create a Calculated Column based on Input Date to calculate Fiscal Year for the given date. for example

 

Input Date is 26/02/2015 and i need to calculate Fiscal Year Start Date of the given date.

 

I can able to calculate using SQL Script like below

 

CASE WHEN MONTH(TO_DATE('20150225', 'YYYYMMDD')) = '01' OR

                  MONTH(TO_DATE('20150225', 'YYYYMMDD')) = '02' OR

                  MONTH(TO_DATE('20150225', 'YYYYMMDD')) = '03' THEN

        

  LEFT(ADD_YEARS(TO_DATE('20150225', 'YYYYMMDD'), -1), 4)||'0401'

 

  ELSE

 

  LEFT('20150225', 4)||'0401'

 

    END AS FISYEAR_FIRSTDAY,

 

but i'm not able to write the same logic in Graphical Calculation View for a Calculated Column.

 

Can anyone suggest me how to get the First Date of the Fiscal Year, First Date of Quarter, First Date of the Week, First Date of the Month for the given date in Graphical Calculate Views.

 

 

Regards,

Ramana.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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