cancel
Showing results for 
Search instead for 
Did you mean: 

YTD Calculations in HANA

Former Member
0 Kudos

Hi All,

I have a requirement to calculate YTD based on the input fiscal year period in HANA.

I have created a input parameter which accepts fiscal year period. I have created a calculated column FY_start to calculate the fiscal start year.

FY_START = leftstr('$$ZMONTH$$',4)++'001'.

In Filter Expressions i have given a formula

("0FISCPER">="FY_START" and "0FISCPER" ='$$ZMONTH$$' )

When i input 2012004 (2012 April), FY_START is caluclated as 2012001. But does not filter the data correctly in filters.

Need your help.

-- Selva.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Should the filter expression include less than or equal to $$ZZMONTH$$ as shown below?

("0FISCPER">="FY_START" and "0FISCPER" <='$$ZMONTH$$' )


Ramana

former_member182302
Active Contributor
0 Kudos

Hi Selvan,

Do check your data types and along with that

("0FISCPER">="FY_START" and "0FISCPER" ='$$ZMONTH$$' )


So was it filtering only for current day? or it is not applying any filter?


Regards,

Krishna Tangudu



Former Member
0 Kudos

Hello Selva,

Please use this formula :

FY_START = leftstr('$$ZMONTH$$',4)++'0101'.

Your input date should be in this format : YYYYMMDD or YYYYDDMM.

Regards,
Sharath

christianschuer
Employee
Employee
0 Kudos

Hi Selva,

could it be possible that you are comparing a String (FY_START) with an Integer (0FISCPER) or an Integer ($$ZMONTH$$) with a String(0FISCPER)?

What are the data types of your variables?

Kind regards,

Christian