Display previous month value in report
Hi,
I have a requirement to display the previous month amounts on monthly basis. here is the example.
In the Cube I have data like this:
<b>Customer Month Amount</b>
C1 Jan 2004 $500
C1 Feb 2004 $600
C1 March 2004 $1000
I want to display in Report with another key figure to show the difference between current month and previous month. Report should look like:
<b>Customer Month Amount <i>Prev_Month_Amount <u>Diff</u>.</i></b>
C1 Jan 2004 $500 0 $500
C1 Feb 2004 $600 $500 $100
C1 Mar 2004 $1000 $600 $400
I have tried using restricted key figures.but it is showing the same amount in prev. moth amount colunm till feb 2004. anyone had similar req. please advise me.
Thanks in advance,
Ram
Hi,
I can only think about a 2 structure approach with cell calculations.
This will result in a static report with 12 rows for each customer. Then you would need to use the new feature of zero supression, to hide those month where no data exists.
Heike
Similar Messages
-
How to Bring the Quarter Period and Previous Month Value for given Input
Hi to all,
I want bring Quarter Period and Previous Month value for the given Input. Plz help me on this
Example :
Input : 06.2008
Output:
Input Prev.Month Quarter 1 Quarter 2 Quarter 3
06.2008 05.2008 03.2008 12.2007 09.2008
12.2008 11.2008 09.2008 06.2008 03.2008
Is there any Standad Exit for this or we have to write coding ?
Regards,
SaranHi,
You can solve this by using Replacement path.There you have a option offsets.Here give the current period.Based on that give the number which previouse month you suppose to want.
I think this 'll help you
assign points if this helps
Regards
JT Goud -
Hi,
I have a couple of accounts that use the previous month value across years. However, sometimes it's necessary update the value in the middle of the year and this change should be reflected in the following months and years mantaining the old value in previous months and years.
Somenthing like this:
Year - FY12
Jan- 100
Feb- 100
Mar- 100
Apr- 100
May- 100
Jun- 100
Jul- 100
Aug- 100
Sep- 100
Oct- 100
Nov- 100
Dec- 100
FY13
Jan- 100
Feb- 100
Mar- 100
Apr- 100
May- 100
Jun- 100
Jul- 100
Aug- 100
Sep- 100
Oct- 100
Nov- 100
Dec- 100
If I change the value in November->FY12 to 200, I want:
Year - FY12
Jan- 100
Feb- 100
Mar- 100
Apr- 100
May- 100
Jun- 100
Jul- 100
Aug- 100
Sep- 100
Oct- 100
Nov- 200
Dec- 200
FY13
Jan- 200
Feb- 200
Mar- 200
Apr- 200
May- 200
Jun- 200
Jul- 200
Aug- 200
Sep- 200
Oct- 200
Nov- 200
Dec- 200
Any help?
ThanksI typically just aggregate up the Base + Adj to get "Total Adjusted". No need for a formula, unless you want to introduce specific override functionality. (Where the override amount would ignore what's in "Base" and "Adj") You may be able to get away with making "Total Adjusted" dynamic calc. This will depend on a lot of different factors, but it's something you should consider.
Sometimes I put my adjustments into a separate form. Sometimes they're on the same form. That really depends on business requirements.
Let's say you don't want to make this a separate dimension. Then the next option is typically creating specific adjustment accounts. The accounts where you're carrying the balance forward would look to see if an adjustment has been made in one of these specific adjustment accounts, and if so, add that adjustment to the prior value. I tend to prefer a separate adjustment dimension as it offers more flexibility, but if you've already got a database built, adding another dimension can be painful.
- Jake -
To display previous month's calday for current calday in report.
Dear Experts,
I need to build a query in which at any point of for given calday, it should produce me the previous month calday's result in the report.
For example i have revenue as key figure in columns. calday in rows and product details in free characteristics.
When calday for eg. 16-04-2011 is entered , report should display 16-03-2011 revenue .
Regards
AlexHi,
u need to use the customer exit variable inorder to serve your purpose..
Create a characteristic variable with Customer exit as processing type.
Case 1: Based on System date...
Case i_vname
When 'ZCEXIT' ""Your Customer exit variable**.
data: date type dats,
l_s_range type rsr_s_rangesid.
Press Ctrl+F6 and provide DATE_CREATE in the Call function Radio button
CALL FUNCTION 'DATE_CREATE'
EXPORTING
ANZAHL_JAHRE = 0
ANZAHL_KALTAGE = 0
ANZAHL_MONATE = -1
ANZAHL_TAGE = 0
datum_ein = sy-datum
DATUM_EIN_ULT = ' '
ULTIMO_SETZEN = ' '
IMPORTING
DATUM_AUS = Date
E_TT = E_TT
E_ULTKZ = E_ULTKZ
l_s_range-low = date .
l_s_range-sign = 'I' .
l_s_range-opt = 'EQ' .
append l_s_range to e_t_range.
endcase.
Case 2:Based on User input date...
data: date1 type dats,
date2 type dats,
loc_var_range like rrrangeexit.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZVAR1'. "Technical name of the user input variable.
date1 = loc_var_range-low.
Press Ctrl+F6 and provide DATE_CREATE in the Call function Radio button
CALL FUNCTION 'DATE_CREATE'
EXPORTING
ANZAHL_JAHRE = 0
ANZAHL_KALTAGE = 0
ANZAHL_MONATE = -1
ANZAHL_TAGE = 0
datum_ein = date1
DATUM_EIN_ULT = ' '
ULTIMO_SETZEN = ' '
IMPORTING
DATUM_AUS = Date2
E_TT = E_TT
E_ULTKZ = E_ULTKZ
l_s_range-low = date2 .
l_s_range-sign = 'I' .
l_s_range-opt = 'EQ' .
append l_s_range to e_t_range.
endloop.
Reply me if you have further querries.
Best Regards
Seshu
Edited by: seshagiri.rao on Apr 18, 2011 12:15 PM -
Need to show Previous months data in report
Hi All,
I have a crystal report 2011 which shows monthly Cash data. It has 3 other columns like Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data in report.
My report also has two parameters- start date and end date. If I give Start date as 1/1/2012 and end date as 12/31/2013 (two years date range) then correct data comes in all columns and for 2013 year, correct data is coming for Previous 12 months column. But if I give only one month date range like start date as 1/1/2013 and end date as 01/31/2013, then it is not showing correct data for these 3 columns - Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data. Ideally as per requirement, it should calculate previous months data regardless of parameter values and put data in respective columns.
Any help/suggestion? Any trick which can help me to show correct data in all columns no matter what date range or months I am taking in parameters.
Is it mandatory to have previous 12 Months data in report to calculate column-Previous 12 months Cash data?
Thanks,
RemiHi Remi,
You can try like this:
I have given a some suggestions i.e You just take one parameter only because u can imagine 3 columns previous data display correctly i.e From Date
Month parameter is also a alternate option.
For Ex: Column1: From Date - 90 Days/3 Months - we get the three months previous data correctly etc.
Finally, create a stored procedure that returns the required columns and does all the calculations on the database side.
Follow abhilash suggestion as well.
Useful threads: Crystal Report Parameter Issue
Pull Last 6 months of data
Month to date data for Previous month
How to find current month, previous month Net Sales by means of formula?
Thanks,
DJ -
Need to display "Calendar Month/Year" at report level from Calendar Day
Hello Experts,
I have a scenario in which I have 0CALDAY (e.g. 01.01.2009) along with other fields available in my report. My requirement is to display "Calendar Month/Year" (01.2009) in my report. Is it possible to have "Calendar Month/Year" in my report from 0CALDAY, by making changes to the query, as I cannot remodel the underlying InfoCube.
Many Thanks,
VAWhat you mean with huge - 100 Mio dataset?
The import of the new infocube will be also take a long time - the database must be insert a new field for every dataset.
=> is this a big infocube, then don't use virtual infoobjects.
=> on a big infocube is important to have a good datamodel - please insert always all 11 infoobjects for the time dimension.
Sven -
To Display "Calendar Month/Year" at report level from Calendar Day
Hello Friends,
I have a scenario in which I have 0CALDAY (e.g. 01.01.2009) along with other fields available in my report. My requirement is to display "Calendar Month/Year" (e.g. 01.2009) in my report.
Is it possible to have "Calendar Month/Year" in my report from 0CALDAY, by making changes to the query, as I cannot remodel the underlying InfoCube?
Many Thanks,
VishwAHI Vishwa,
Hope it will helps.
How to get month from CREATE DATE field??
Regards,
SVS -
Show Previous Balance value in Report.
Hi,
I'm using Crystal Reports with Visual Studio 2010. I'm generating a report which shows columns Debit and Credit and SUM values on the buttom of each column. The report is filtered using a date range, which I specify in my connection via C# code (below).
string sqlString = "";
sqlString = "SELECT * FROM Ledger WHERE ([Payment Date] >= #" + FromDate + "#) AND ([Payment Date] <= #" + ToDate + "#)";
Now I need a "Previous Balance" value, which would be the SUM of Credit and Debit columns, which are prior to "Payment Date". How do I accomplish this? I've attached a sample of the report I'm looking for. Please be specific with your reply, because I'm new to Crystal Reports.
Thank you so much for your help.
AronHi Aron,
Crystal is database agnostic, meaning it will run a report against any database. If you create a report using AS/400 it's possible to use that same report against an Oracle or SQL Server database as long as the recordset Crystal is expecting is the same.
So having a report run from a Stored Procedure will work on different databases as long as the metadata for the Stored Procedures between the databases match.
For the subreport, when you drop the subreport into the Group Footer. Right-click on the subreport and you have the option to Link Subreport. You can select the OwnerID from the main report and link it to the OwnerID in the subreport.
Your c# suggestion may be going the long way around the barn. If you link the subreport in your Group Footer 1, you should be able to get the Previous Balance for that OwnerID. When you link the subreport, it creates a Record Selection Formula in the subreport that should return only the records for that OwnerID.
Once you have the subreport linked, edit the subreport and go to Report | Selection Formula | Edit Record Selection Formula. You'll see what the linking created. You can now edit that formula to include your date range that is outside the current period.
Hope this helps,
Brian -
How to display the comparision values in reporting?
Hi,
As per my requirement , this was the scenario
-> INCREASE IN CURRENT LIABILITIES
-> DECREASE IN CURRENT LIABILITIES
Here i need to take all the G/L's of current Liabilities of previous fiscal year and current Fiscal year Current Liabilities amount , Based on the amount comparison i should display if amount is more , the amount should be in Increase liabilities else the amount should display in Decrease Liabilities.
And more the amount should display in month i mean based on period wise.
April09 may09 june09 Total -
Mar
INCREASE IN CURRENT LIABILITIES
DECREASE IN CURRENT LIABILITIESVasu,
Display current and previous year liabilities.
create a calculated keyfigure(diff) to find out difference(increase or descrease).
Create 2 more CKF for increase and decresase in liabilities.
INCREASE IN CURRENT LIABILITIES : ( diff > 0 ) * diff " use boolean to calculate same
DECREASE IN CURRENT LIABILITIES: ( diff < 0 ) * diff " use boolean to calculate same
Srini -
YTD and monthly value in reports
Hello experts,
some of our reports show value in terms of YTD value...and the corresponding characteristics are Accounts....
My user wanted to know if possible to see some accounts showing YTD value and some accounts Monthly value....
Is it possible?Both Monthly value and YTD value are available in cube....
Thanks.
Regards,
S Hhi,
u can also include both monthly value column as well as YTD in report.just that u need to have filter for those account .
a way is that u can include fiscal year period var in selection screen then make restriction on this basis.
and for YTD will show value from start of year till date
ex- if u enter march 2010 to aug 2010.then YTD will show jan 2010 to aug 2010 data.
So try this
thanks
nilesh -
SAP Trans.Code-To view the previous month's OSP Report
Pl.mention the SAP trans.code for view the OSP status as on previous month.For an example,I want to see the status of OSP stocks as on 30.11.2010.How can I see?From MBLB,we can see the current OSP stock status.Is there any trans.Code for view the previous month OSP stock status?
Regardshi,
there is no t code specific to your requirement, but you can get the details through MB51, by metioning repective date and movement types like 541,543 etc..
hope this will help..
Regards
Manohar -
How should get last month value from report?
Hi experts,
How should last month value. For example
jan feb march
100 -- ---
Here i want to get jan month value in march coloumn.Hi ,
It is only show last month value. but my requirement is if last month is empty it should bring Before Last month.
For Example
Jan Feb Mar
1000
i need if the Feb value is empty should come jan month value. -
How to display MTD Daily values in report (0calday display )
hi,
my cube has 0calday (linked with posting date), ocalmonth and volume. when i select a given month or calday range in selection, I want to display all volume for each day.
If i use calday or posting date in rows, I am getting volume for only those days for which transaction data is available. (i.e, if there is no transaction volume available for yesterday, then it will not display yesterday values at all). Instead i want that report should also display all the day in a month in rows and corresponding volume.
Is there any variable or solution for this?
I want to display below format.
date(all days in a month) volume
01-feb-08 --- 1000
02-feb-08 --- 0 (note: now this record is dispaying in report)
03-feb-08 --- 5000
04feb-08 --- 8000
19-feb-08 --- 1000
27-feb-08 --- 0 (this is a future date, hence volume will be zero as no data avlble)
28-feb-08 --- 0
29-feb-08 --- 0
note: i have alredy checked suppress zeroes option to none, but it didnt work.
thanks,Hello Avneet,
you could create a user exit variable for 0CALDAY (for example ZVAR_CALDAY).
Besides this you should have some variable for the input of the month (for example ZVAR_MONTH based on 0MONTH).
The code of the exit could be as follows:
Begin
data: l_t_var_range like rrrangeexit.
data: iMonth type i.
data: ls_range type rsr_s_rangesid.
case i_vnam.
when 'ZVAR_CALDAY'.
loop at i_t_var_range into l_t_var_range where vnam = 'ZVAR_MONTH'.
iMonth = l_t_var_range-low.
endloop.
here comes the code to determine all days for the given month (iMonth)
each determined day value (sDay) is added to the result table as follows:
ls_range-sign = 'I'.
ls_range-opt = 'EQ'.
ls_range-low = sDay.
append ls_range to e_t_range.
endcase.
End
I have not checked this code, it's only to show the idea.
Please do not hesitate to ask, if you have some detailed questions.
Regards,
Kirill -
XML tag to display previou month
Hi I want to display previous month on my report what is the XML tag I can add in my RTF template.
Hi ,
{$SYSDATE()$} - current date (the system date of the server on which BI Publisher is running)
{$FIRST_DAY_OF_MONTH()$} - first day of the current month
{$LAST_DAY_OF_MONTH()$} - last day of the current month
{$FIRST_DAY_OF_YEAR)$} - first day of the current year
{$LAST_DAY_OF_YEAR)$} - last day of the current year
you can also add or subtract as mentioned below..these are all the functions that are avilable on Dates.
{$SYSDATE()+1$}
{$SYSDATE()-7$}
this may help you to get the previous month.
Thanks. -
Last Month value for the keyfigure in Report
HI ALL,
how do we get keyfigure value for the last month in the report.
for ex: for amount keyfigure should come for the last month rest of the key figures should come for the current month values.
SBU | AMOUNT (LAST MONTH VALUE) | QTY(CURRENT MONTH) | NETPROFIT(CURRENT MONTH)
The above shown is ex as i required in same manner. Even i restricted with calmonth offset value -1 in keyfigure but it is not working. please help me to get solution .
Thanks
Pinky ReddyHi Pinky,
It is not advisable to use offset to get the previous month value.This is not effective in the case when your current month is Jan & u have to get the previous year's dec month value.It is always better to opt for Exits
Do use the code mentioned below.
Note:- ZCUSMFIS3 - Variable in the selection screen for entering current month
'ZPREVPER - Variable with which the amount key figure has to be resticted.
WHEN 'ZPREVPER'.
IF I_STEP = 2. "after the popup
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZCUSMFIS3'.
V_PERIOD = LOC_VAR_RANGE-LOW+4(3).
V_FYEAR = LOC_VAR_RANGE-LOW+0(4).
V_FVARIANT = 'B1'.
V_FISCPERYEAR = LOC_VAR_RANGE-LOW.
IF V_PERIOD = '001'.
V_PERIOD = '012'.
V_FYEAR = V_FYEAR - 1.
CONCATENATE V_FYEAR V_PERIOD INTO V_FISCPERYEAR.
ELSE.
V_FISCPERYEAR = V_FISCPERYEAR - 1.
LOC_VAR_RANGE-LOW = V_FISCPERYEAR.
ENDIF.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW. "YYYYMMDD - DD will indicate the no of days
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
Hope this provides the solution for your requirement.
Regards,
Saswati.
Maybe you are looking for
-
Does Apple make a wireless router?
Does Apple make a wireless router?
-
How do u transfer pictures/tunes from 4 year old mac to new mac
how do u transfer pictures/tunes from 4 year old mac to new mac ?
-
Unable to delete and update an ms access db
Hi, I am presently working on a project in dreamweaver 8 which is connected to an ms access db. I am completely new to both applications but i have been able to connect to my database and display information. As it is now i have both a delete button
-
Macbook Pro is SLOW as ****!!!
I'm getting really annoyed with my Macbook! First of all, it's really really slow! Something always seems to be accesing the hard drive causing it to spin constantly. I'm always seeing the bloody beach ball and i'm always waiting for the computer to
-
Illustrator hangs or crashes when I try to save as PDF
I am using Illustrator to creates designs for a Flex app. My document has a lot of symbols, rasterized images and layers (it's about 8.1 MB). Illustrator has stopped doing two things that I need it to do: 1) It just hangs (infinite beachball on OS X)