cancel
Showing results for 
Search instead for 
Did you mean: 

Current and Previous FY/period amount needs to be calculated

Former Member
0 Kudos

I have requirement to calculate Current and Previous fiscal year/period Amount.

1.Based on the user input(selection prompt) year and period, previous FY/period should be calculated. Note :Period and year should be mandatory fields

2.Key figure (amount) to be displayed for previous FY/period and current FY/period based on input

My question is, how to get previous and current FY/period AMOUNT based on user input.

I have created a customer exit variable to get the previous FY/period.

Thanks

Barath

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Barath,

You can use Offset for your requirement, below is the link you can refer

http://wiki.scn.sap.com/wiki/display/BI/Offset+Variables+Example

If you have many key figures then create a new structure and create this two new formula without mentioning the keyfigure(only characteristic restriction). Now when you will do reporting so under this structure all keyfigure values will be split accordingly so need to create many formulas.

Thanks

Vijayendra

Former Member
0 Kudos

Thanks Vijayendra,

Is it possible to achieve the below scenario.

Assume that query is build of top of cube, Cube contains data for the Year 2015 and Period 01 02 03 04 05.

In the query, year and period are mandatory fields, when user runs query for  2015 and 05...

I have a Key figure(AMOUNT), for that i need to display value for 05/2015 and 04/2015(previous)

Assume, user ran the query for 05/2015 then the query output should be below-

year     period     Doc     amount(i.e. 05/2015)     amount(previous month i.e. 04/2015)

2015     05          1          1000                                               500

2015     05          2           5000                                             1000

Loed
Active Contributor
0 Kudos

Hi,

Just create a two (2) SELECTIONS or RKF..

RKF1 = contains AMOUNT KF and your year/period (is this 0FISCPER?) with filter your are using now

RKF2 = contains AMOUNT KF and your year/period with filter your are using now BUT right click it then choose OFFSET and enter -1

Regards,

Loed

Former Member
0 Kudos

Yes Barath,

You can achieve this with offset, one RKF will be without offset and another RKF with -1 offset.

But here you Period should not be display atttribute because if you keep period also in display, then your result will be like this.

year     period     Doc     amount(i.e. 05/2015)     amount(previous month i.e. 04/2015)

2015     05          1          1000                                              

2015     05          2           5000                                            

2015     04          1                                                                 500

2015     04          2                                                               1000

As it will split the data,

Thanks

Vijayendra

former_member586947
Contributor
0 Kudos

Hi Barath,

     Is the user entering current fiscal year period? On what basis you need to derive the previous fiscal year period. Let me know the user input values.

I assume on 0FISCPER you need to derive the values. Then you need to create two keyfigures.

1. Current fiscper ( Use standard bex variable in the restriction 0FPER)

2. Create One more keyfigure for previous fiscper and create a customer exit variable. Restrict the keyfigure with the created exit variable. then write the code in I_STEP 2.

Regards,

Satya

Former Member
0 Kudos

Thanks for the reply Satya,

your logic will'nt work in my case.

Let me clearly explain with example,

Assume that query is build of top of cube, Cube contains data for the Year 2015 and Period 01 02 03 04 05.

In the query, year and period are mandatory fields, when user runs query for  2015 and 05...

I have a Key figure(AMOUNT), for that i need to display value for 05/2015 and 04/2015(previous)

Assume, user ran the query for 05/2015 then the query output should be below-

year     period     Doc     amount(i.e. 05/2015)     amount(previous month i.e. 04/2015)

2015     05          1          1000                                               500

2015     05          2           5000                                             1000

former_member586947
Contributor
0 Kudos

Hi,

   If that is the case then you have to go for Cell Definition. Create two structures, in one row structure use only year and period. In the column structure add two keyfigures. Create formulas for each of the cells in the cell definition.

Put all other analysis objects in free char.

Regards,

Satya.

Former Member
0 Kudos

Thanks Satya,

Could you pls elaborate this.

I have 10+ characteristics to be displayed in rows and 10+  KF's in columns'