cancel
Showing results for 
Search instead for 
Did you mean: 

2 months comparison in Bex reports

Former Member
0 Kudos

I need to create a reports where the user will enter the parameter for selected month / year.

In the output it should show the result for 2 column .. that is selected month data and (selected month_1) data.

Suppose user enter the 001/2008 means the out put data will have 2 columns 001/2008 data, 012/2007 data.

Which type of selection,variable to be used for the period.

Sure marks for helpful answers.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189638
Active Contributor
0 Kudos

You can use a user/default variable and then calculate the previous month data by using the offset.

But I have seen cases where offset does not work for the previous year when subtracted from current year. So if you are also facing the same issue then you might have to go for the Customer Exit variable.

Also if you go for customer exit variables, the code will be very simple

Answers (1)

Answers (1)

Former Member
0 Kudos

if u wish to enter both month and year try using fiscal period/year

now say for e.g. u wanna display amount for current month and previous month

bring amount in keyfigure structure in columns

hit edit

in dialog box bring in fiscal year / period

right click fiscal year/period and hit restrict

in new dialog box select /create variable of single value, mandatory.

hit okey

now again bring amount in column

hit edit

in dialog box bring in fiscal year / period

right click fiscal year/period and hit restrict

in new dialog box select same variable u created in previous step

right click that variable and select SET OFFSET FOR VARIABLE.

now use value -1

hit okey

this completes ur query definition

now in header of amount u wish to see the month

so put ur cursor in description of amount

remove amount and then hit ENTRY OF TEXT VARIABLE

create new text variable

put time char as fiscal year/period.

put replacement path.

replacement path tab

replace variable with Info object

play with offset length

hit okey

now it should oslve ur issue.