Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Web Intelligence
Viewing all articles
Browse latest Browse all 5402

SAP BI Formula RelativeDate and currentDate

$
0
0

Today 4/27/2016

 

I have a code to return Year and number of month.

Ym LM-2( Dimension)

=If(MonthNumberOfYear([Key Date])<4

;[LY]+FormatNumber(MonthNumberOfYear([Key Date])+8;"00")

;[CY]+FormatNumber(MonthNumberOfYear([Key Date])-4;"00"))

Key Date( Dimension)

=RelativeDate(currentDate();-1)

 

LY( Dimension) 

=FormatNumber(Year([Key Date])-1;"0000")

CY( Dimension)

=FormatDate([Key Date];"yyyy")

 

LY Return 2015

CY Return 2016

Key Date Return 26/04/2016

 

Ym LM-2  Return 201600 << This is Problem

Today Month 04 >>>>> ;[LY]+FormatNumber(MonthNumberOfYear([Key Date])+8;"00")

Should be 2015+(4+8) = 201512

 

I Really want Month -2,-3,-4 = 201602,201601,201512

 

Thank you

Sorry about my English


Viewing all articles
Browse latest Browse all 5402

Trending Articles



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