on 06-10-2011 6:19 AM
I am getting data from SQL server like below:
0calmonth 0amount
01.2000 100
02.2000 200
03.2000 -200
04.2000 300
......
01.2001 0
02.2001 100
03.2001 150
..
Now in Query designer I need to create output as below:
CalMonth 01.2000 02.2000 03.2000 04.2000 ....................................01.2001 02.2001 03.2001
Sum(0amount) 100 300 100 400 0 100 250
If this was just one column, I would have created this easily with the help of customer exit variable ( When I know the last Calmonth), but in this case i need to add this for all months. How I can handle this scenario?
Regards
Amandeep Sharma
Edited by: AmanSharma123 on Jun 10, 2011 7:20 AM
Hi,
My suggestion will be to do this calculation at infoprovider level.
In BEx, you have one option. Add Calmonth and Amount in the Column. Go to Key Figure properties -> Calculate Single Value as -> Cumulative along the Row.
But this is just a display property, it does not actually calculate. SO you cant use these values for further calculations. If suppose you filter out one month, value of that month will be ignored
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
There is std code for such scenarios in the FI GL flow. Account balances are calculated in a similar way. The balance in this month is forwarded further. Check the note below for code.
1233941 - Start routines for key figure 0BALANCE (see Note 1153944)
You can build similar logic. The note consider fisc per whereas for you it is calmonth.
Hi Parth, Murali.
Let me explore the first option with users and see how it works.
Writing ABAP code will be very complex in my scenario as planning data is stored in different cube. Will think about this option if nothing works out for me.
I will keep you guys posted. Thank you for your guidance again.
Regards
Aman Sharma
Hi Murali,
Just a dumb question. Can we achieve the same at query level with the help if Virtual KF? I understand that Virtual KF will make query very slow. Just curious. If we can do that at query level, do you have any similar code for calculating YTD KF in virtual KF?
Please guide me.
Regards
Aman
Use 0calmonth in the Column. Place it above the keyfigure structure in the column.
This should solve your problem..
--- Thanks...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.