cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Add or convert using JavaScript in Conversion File

Former Member
0 Likes
730

Hi Expert..!

My scenario is as follows, I have to carry the burden of information from a cube BW BPC in the cube BW I have various ratios which should represent me the time dimension in BPC I have a dimension that is the year (eg: 2015) and time have projections to 10 years from the current year as follows (2016.DEC, 2017.DEC ... etc), the period in this case is always the same.

In the transform file I'm using the next sentence since I do not have no way of identifying each year ratio belongs to:

Time = * MVAL (ZFM_PER10 | * STR (1) 0FISCYEAR)

With this to the above example, I get: 12015

In the file conversion it is what I intend to tell you that if you start with 1, will add what I have in the year +1 and concatenate .DEC if 2, we add 1 year and concatenate .DEC.

To do this I'm trying to use a JavaScript but does not like telling me that adds 1 .. to read:

12015 -----> 2016.DEC

Thank you for your help ..!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Natalia,

Please show us 5 lines of source data and how you want it in BPC, also a mock up of those data.

then we can help you to solve the problem.

maybe try this in the mean time.

js:parseInt(%external%.toString().substring(1,4))  + parseInt(%external%.toString().substring(0,1)) + '.DEC'

Andy

former_member186338
Active Contributor
0 Likes

Hi Natalia,

Please try to explain in details:

Cube from? Cube to?

Data sample etc...

Vadim