on 2022 Jan 26 10:24 AM
Hi
I'm trying to load data from an Infocube to BPC. I've a problem with time conversion. I need to add a month to the month in the cube. For instance: if I have 2021012 in the cube, I need to load 2022.JAN in BPC. Indeed this is the only month I having problems with, the rest of the months are working fine with this conversion file
For the XXXX012 data i need someting like this, but of course it isn't working
So I'm trying with some JavaScript code, but I'm not getting proper outcomes.
First I've tried this in the Internal column:
js:%external%.toString.substring(0,4)+1.concat('.JAN') -> I get an error in the package execution
Then I've tried with that code in the Formula column, but it isn't working. I got no errors but BPC is trying to load 2021012 instead of anything that could be understandable to it (e.g. 2021.DEC or 2022.JAN)
Can anyone advice?
Thanks
Daniel
Carlos,
Use something like this in the internal column for ????012
js:(parseInt(%external%.toString().slice(0,4))+1).toString()+'.JAN'
Regards
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Incorrect JS syntax 🙂
Try:
(Number(%external%.toString().substring(0,4))+1).toString()+'.JAN'And always test your JS in the online editor like:
or other
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Nikhil, it worked with your code!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
5 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.