Current year /last year in reports
I need to report summarised data for range of periods and I need to compare the current year results with last year.
For example I need to report Jan to June of current year and compare in the same reports the results of last year.
How to select the last year? I tried with offset (year-1) but it does not work.
Since I am giving the range of period( 1 to 6) in selection the period , hence the offset does not populate.
Sure mark for helpful answers.
Mani,
as with your other topic in the BCS forum, there are ways to use the offset for this, but it all depends what variables you use for the period/year derivation. It also depends if you are using BCS and need the YTD values.
so, here are a couple of options:
if you are using the fiscal year/period variable, then you will be restricted by what your FY variant is. (thus the value of your offset). I think even if you use K4, taking -12 from your value will get you to the same period prior year.
as with other recommendations here in the forum, you can offset just the year variable if your are using two separate ones (one for posting period one for fiscal year). As BCS doesn't have the cumulative KF's, this is pretty much the only option that you have if you need to get the YTD values (since you need period 00 for the YTD values in the BS)
You mentioned that the offsets don't work for you - double check that by using the text variables in the column headers, and you should see what data is being pulled in there. Also, make sure that you are restricting the variables (fiscal year) on each column. If you put the restriction on the entire query, it will only give you one value, so instead you need to put the fiscal year variable in each column (with appropriate offsets)
let us know if that worked
Similar Messages
-
Help creating a formula which returns current date last year
I need help creating a formula which returns the current date last year. I also need it to work during leap years.
Any ideas?Hi Dagros,
I'm lucky to be a universe designer, I have to do this only once
The easiest way would probably be to use
=RelativeDate(CurrentDate();-365)
So subtractiing 365 to get the same date last year,
but you would need some extra logic for the years with a feb 29 in those 365 days.
=If FormatDate(RelativeDate(CurrentDate();-365);"dd") = FormatDate(CurrentDate();"dd")
Then RelativeDate(CurrentDate();-365)
Else RelativeDate(CurrentDate();-366)
Another question to ask is if you really want the same date last year, or if you also want a really 'same day' so monday compared to monday etc. in this case you would just subtract 364 days and get the day 52 weeks back...
Good luck,
Marianne -
How to get Current month last year sale in report
HI,
I would like to compare the sale value of a month for any year.
ie sale of the march month for this year ,previous year and a year before ..like that
at least for two years..ie current and prvious year.
how can i get it done in query?
thnxCreate three restricted key figures.
In one restrict month by current month.
In other use offset of -12 and -24 while restricting current month. -
- How to Display Sales Qty & Value for This Year & Last Year in 2 Columns -
Dear All,
I'm having trouble in extracting the last year figures based date entered. I'm actually would like to create a query where I'm able to know the "TOP 10 item sold based item category". I've created a query, which show the top10 item sold (total quantity & value) for this year, but not able to display the last year figure (quantity). Please advise & thanks for your help and time.
SET ROWCOUNT 10
SELECT T1.ItemCode, T2.ItemName, T3.ItmsGrpNam, SUM(T1.Quantity) as "Total Qty Sold", SUM(T1.TotalSumSy) as "Total Amount"
FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
WHERE T0.DocDate >='[%0]' AND T0.DocDate <='[%1]' AND T3.ItmsGrpNam ='[%A]'
GROUP BY T1.ItemCode, T2.ItemName, T3.ItmsGrpNam
ORDER by SUM(T1.Quantity) DESC
I wish to have the output as follow
Item Qty (2008) Qty (2007) Value(2008) Value(2007)
A 300 150 1000 500
B 250 300 800 650
C 100 250 700 550
Currently, My results display:
Item Qty (2008) Value(2008)
A 300 1000
B 250 800
C 100 700
Cheers,
SereneHi,
if you want more flexible, you could try this modified Istvan's query:
SELECT top 10 T1.ItemCode, T2.ItemName, T3.ItmsGrpNam, SUM(T1.Quantity) as "Total Qty Sold",
SUM(T1.TotalSumSy) as "Total Amount" ,
(select sum (r.Quantity) from ODLN h
inner join DLN1 r on h.DocEntry=r.DocEntry
where h.DocDate>='[%4]' and h.DocDate<='[%5]'
and r.ItemCode=T1.ItemCode) '2007 Sold',
(select sum (r.TotalSumSy) from ODLN h
inner join DLN1 r on h.DocEntry=r.DocEntry
where h.DocDate>='[%6]' and h.DocDate<='[%7]'
and r.ItemCode=T1.ItemCode) '2007 Amount'
FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
WHERE T0.DocDate >='[%0]' AND T0.DocDate <='[%1]' AND T3.ItmsGrpNam between '[%2]' and '[%3]'
GROUP BY T1.ItemCode, T2.ItemName, T3.ItmsGrpNam
ORDER by SUM(T1.Quantity) DESC
Rgds, -
Report on Current and Last Year Sales
Hi ,
I have a requirement to create a report which would display in one column sales from current fiscal year/period and 2nd column sales from last fiscal year/period at the same time
Please guide.Hi,
You can achieve this by creating two selections in columns in query designer.
First one restrict the key figure with current Fiscal period.
Second restrict the key figure with Fiscal year with customer exit and -1 as offset value.
Hope this helps........
Rgs,
Ravikanth. -
This Year / Last Year on Rolling 12 months
I have a requirement to create a LY vs. TY comparison report with rolling 12 months - which means, TY measure will be the fact from current date to 12 months ago and the LY measure will be from 12 months ago to 24 months ago.
I was hoping to use the AGO function to calculate the LY and create a filter in the report using - Date between (SQL_TSI_YEAR, -1, CURRENT_DATE ) and CURRENT_DATE.
But this does'nt seem to be working. The result splits the AGO measure based on the year, instead of just summing the sales amount. Would anyone have a better idea on how I can achieve this?
Prompt response would be greatly appreciated.
Thanks,
Ruchi.Thanks for your responses. I shall take a look at the blog.
Meantime, I dont have month or year on the report. The metric is supposed to be summed by the rolling 12 months. and calendar is not on the report.
Anyway by which I can create 2 different metrics for rolling 12 months as TY and from 12 to 24 months as the LY, instead of havng to create a filter on the report?
Thanks again,
Ruchi. -
We have a report that summarises monthly sales & credits for 2 years in a group footer. The footer is a sum of a formula in the detail section that calculates the monthly sales at the Item code level
Item 1
Group Footer 1 July Aug Sept Oct
Sales Last Yr @July_LY_Sales @Aug_LY_Sales @Sep_LY_Sales @Oct_LY_Sales
Credits Last Yr @July_LY_Credits @Aug_LY_Cred @Sep_LY_Cred @Oct_LY_Cred
Sales This Yr @July_CY_Sales @Aug_CY_Sales @Sept_CY_Sales @Oct_CY_Sales
Credits This Yr @July_CY_Cred @Aug_CY_Cred @Sep_CY_Cred @Oct_CY_Cred
<Curr Yr Graph1>
<Last Year Graph2>
Item 2
Group Footer 1 July Aug Sept Oct
Sales Last Yr @July_LY_Sales @Aug_LY_Sales @Sep_LY_Sales @Oct_LY_Sales
Credits Last Yr @July_LY_Cred @Aug_LY_Cred @Sep_LY_Cred @Oct_LY_Cred
Sales This Yr @July_CY_Sales @Aug_CY_Sales @Sept_CY_Sales @Oct_CY_Sales
Credits This Yr @July_CY_Cred @Aug_CY_Cred @Sep_CY_Cred @Oct_CY_Cred
<Curr Yr Graph1>
<Last Year Graph2>
In the footer under the data, we want a 4 line graph (or 2 x 2 line graphs for this year & last year). One line for sales for the current 12 months, and with it, a line plotting the credits, so as to see the trend over that year. And then we want a line graphing the previous years sales and a line graphing the previous year credits for the 12 months.
On the data tab in chart expert, we selected the Place chart for each SHDOC.ITEM (Item number) in the footer and this is positioning correctly. We have tried selecting "On change of shdoc.item and we have also tried For each record. We selected on change of shdoc.item to generate the graph for each item. We then added the 12 formula for the current year in the Show Value panel
In the show value panel we tried using the detail formula, the Report Area: Sum of <formula> and the Group 1: Sum Formula. They all display as @July or @Aug which is a dependent formula used to identify the month
We have added the above formula for each month and each value, but we can't work out how to group the monthly data into the 4 series of 4 lines (1 colour each) - Current Year Sales, Current Year Returns, Last Year Sales, Last Year Returns for the charting. We have tried to create a graph with only 1 set of monthly data (viz, just 12 months current year sales) But no matter what options we take, we seem to get 12 line chart representing each month rather than 1 line representing 12 months.
Can someone point us in the right direction?Please re-post if this is still an issue but search forums first, lots of chart questions have been answered.
-
New white Macbook vs last years aluminum Macbook
Hey all,
I currently have last year's standard aluminum macbook. My mom just won a standard macbook (the new white one) in a sales competition. She offered to give it to me and take mine. Besides this new one having snow leopard vs min only having leopard, what are some of the advantages of taking the new one? I kind of like my aluminum frame makes it feel sturdy, this new one however is VERY clean looking and I'm digging the interface a little more. Spec wise what would be the better decision?
Sorry if this is in the wrong place..
ThanksWelcome to Apple Discussions!
Aluminum has been shown to have more interference with WiFi, although not as bad as some other substances. Aluminum notebooks can receive WiFi generally as well as most other notebooks, though some people have noted more issues.
Your mileage may vary.
Polycarbonate has had a tendency to get more dirt, but that's also partly due to the fact it is white. Dark dirt attracts itself to white surfaces as much as a light dirt attacts itself to dark surfaces. Nothing you can do about that except keep your work area clean of food, drink, and anything else that might impact your machine in its color.
Don't underestimate the strength of the polycarbonate body. It is the same material, albeit not as thick as bullet proof vests. So I wouldn't trust it to a bullet, but then again, if you have bullets near it, you have greater problems!
You still need to be careful of how you plug in cables regardless of the body*:
http://www.macmaps.com/frayguide.html
Furthermore, in willing the machine, I hope the seller made sure to include everything that came with the machine new. See my FAQ* on buying used and refurbished Macs:
http://www.macmaps.com/usedrefurbished.html
- * Links to my pages may give me compensation.
Message was edited by: a brody -
How to show current year and last year sales in a WEBI Report
Hi Guys
How can show current YEar Sales in one column and Last YEar Sales in the other column based on a user prompt for the Current YEar Column.
For Example is user enter 2010 for Year how can i show a Column for Sales-2010 and Sales 2009.
ThanksIf you can modify your Universe add an object named New Object Last Year whose SQL is:( yourTableName.Year + 1)
Then in WebI create two distinct queries in your query Pane. In the first one you could do this:
Query 1:
objects: Year, Sales ... etc.
filters: Year Equal to '1. Prompt Year'
Query 2:
objects: Year, Sales ... etc.
filters: New Object Last Year Equal to '1.Prompt Year'
Then in your report you can drag each object on their respective columns.
If you don't want to use two distinct queries, use one like this:
Query 1:
objects: Year, Sales ... etc.
filters: Year Equal to '1. Prompt Year'
Or
New Object Last Year Equal to '1.Prompt Year'
Edited by: PadawanGirl on Jun 23, 2011 6:28 PM -
Current Year and YTD in Report/Query
Hi to all the experts here,
I have a report requirements to show the cost in the report for the current fiscal year and last fiscal year filtering by YTD month in the report as below when the user enter the month: 12.2010, the month: 07.2010 is the first posting period of the fiscal year.
07.2010 08.2010 09.2010 10.2010 11.2010 12.2010 Last Fiscal Year Last 2 Fiscal Year
Current Year 10,000 20,000 20,000 20,000 20,000 20,000 100,000 90,000
Last Year 15,000 15,000 15,000 15,000 15,000 15,000 120,000 100,000
I know that I need to create customer exit to archieve this, but I not sure what to do to get this, I have problems on getting the figures for the Last Fiscal Year and Last 2 Fiscal Year here.
Please help. Appreciated alot. Thanks alot!Hi
The Fiscal year/period (0FISCPER) in your BW system must be maintained as starting from 07.2010 onwards then you can try the below:
In the report Filters you can use the manual entry variable for 0FISCPER where the user can input the month restrictions.
Then for the Current year and Previous year amount KFs you can create 2 customer exits for Current year and Previous year on 0FISCPER characteristic where you can set the interval using the values input by the user in the selection screen. (eg. If user enters 7.2010 to 12.2010 you can use these values in the exit code to set the interval for the customer exit variable.)
This way you can have the amounts restricted by the period entered by the user in the report.
For the structure you have mentioned in your post you can have the 0FISCPER in columns and then the KFs current/previous year in the rows so that once you have the Current/Previous YTD as created above, you will see the individual month period values also in the drilldown.
Hope this helps.
Regards,
Ninad -
Posting Depreciation for last year in the current year
Hi,
We have a situation in which we have to book depreciation for assets that were put into service since last year in the current year. The depreciation expense was accrued and reported when the year was closed out. However SAP wouldnt allow us to calculate the depreciation for anything before 01/01/2009. The assets were put into service in July of last year and hence we need to post 6 months of depreciation that we accrued last year in this posting period (when we will be capitalizing those assets). How do we go about doing this?
Here is what we tried:
1. Manual Depreciation: Doesnt work. The depreciation key we are using (LINA) doesnt allow manual depreciation
2. Changing the ordinary dep start date: You can change this date to last year but it wont calculate the depreciation from last year. It just starts the useful life from last year. The depreciation that is being caught up starts from 01/01/2009
3. Unplanned Depreciation: This is not an option because it goes to a different G/L account. The client wants it to be in the regular depreciation expense account only.
Any suggestions?
Thanks!Hi,
So far my knowledge goes there is no way wherein you can capitalise assets in currnet year and account for dep from the previous year unless you go for post capitalisation vide ABNAN.Let me try to explain it by the following example.
FY: April to March
APC 10000/
Rate od dep 10%
Ord dep Start 01.10.08.
Asset capitalisation date 01.10.08 but posted in the system on, say 01.04.09.
Line items for ABNAN
70 Asset A/c 10000
75 Acc Dep 500(on 10000 @ 10% for 6 months)
50 Rev for post capitalisation 9500.
FB60 Line items.
31 Vendor Account 10000
40 Prior per dep 500
40 Rev from post capitalisation 9500.
I do hope you will be able to clear your confussion.
With best wishes
Monoj
Edited by: MONOJ SARKER on Aug 5, 2009 12:11 PM -
Hi BW Expert,
I have sales report the current primary volume is the CKF dispalying and i have problem last year primary volume is not dispalying . i tried using offset -1(fiscal year period) the values are not diplaying .Can any one suggest how to dispaly the last year values.
Regards
sivarajuHi,
As you have mentioned in post, there is problem with pervious year sales volume report. Are you looking data for entire year, in that case you should offset for fiscal year -1.
Also you are looking only for one period of pervious year, offset with -12 not with -1. If those restrictions are correct, check if you have fiscal year variant included in query. For offset to work proper you should have the fiscal year variant field in the query.
only then offset will work fine.
Hope this helps
Regards
Akhan -
Sales report for current month and year a go month
i could you please guide me builting report for current monthwise for current month and year a ago month
report parameter month_year='06-2010'
tables = sales and below are the table fields
customer_id
invoice_dt
invoice_am
thanks
nhmOkay, Still you did not mention how you will pass value in report while generating.
Anyway the query with UNION ALL will work. For Example.
I am assuming that the parameter for date/month you will pass in range like 01-JUN-2010 to 30-JUN-2010
SELECT customer_id, SUM(curr_value) curr_value, SUM(past_value) past_value
FROM
SELECT customer_id, NVL(SUM(invoice_amount),0) curr_value, 0 past_value
FROM sales
WHERE invoice_dt BETWEEN :P_FROM_DATE AND :P_TO_DATE -- here P_FROM_DATE and P_TO_DATE will be the date range for current year as i showed above.
AND -- Any Condition goes here...
GROUP BY customer_id
UNION ALL
SELECT customer_id, 0, NVL(SUM(invoice_amount),0)
FROM sales
WHERE invoice_dt BETWEEN ADD_MONTHS(:P_FROM_DATE,-12) AND ADD_MONTHS(:P_TO_DATE,-12) -- This add_months function for the previous year same month.
AND -- Any condition goes here...
GROUP BY customer_id
GROUP BY customer_idNow using the above query you can design the tabular report as you showed the format.
-Ammad
Edited by: Ammad Ahmed on Jul 3, 2010 7:55 PM
added GROUP BY -
Each year for the past 5 years I make a family calendar and send copies to all he family members around the globe. I hate that I have to recreate all the birthdays and special occasions from scratch, and re-drag all the photos onto these dates, in the lower half of the page of each month on the new calendar. How can I create a new calendar for the current year and port all of these photos/comments into the new calendar from last years calendar, to save having to redo all this work!! I am not talking about the upper half page of the photos only...I am referring to the calendar page of each month.
Thanks in advance.
ColinWelcome to the Apple Discussions. Open iWeb so you see your original site in the left hand pane. Use the File->New Site menu option to create a new site. Give it the name you want.
Now select a page in your original site and type Command+D. That will duplicate the page. Drag the duplicate page down to the new site and rename it as needed. Do that for the other pages you need in the original site.
OT -
Parameter for Last Week, Last Month & Last Year from the current Date
I have a crystal report that has a StartDate & EndDate parameters from the stored procedure that I am calling. Now i got a new requirement saying that my user wants a drop-down parameter in which they need to be able to select last week (Sunday to Saturday), last month, last year instead of manually selecting start date and end date parameters? Can anyone please explain me how to do this?
(FYI, I am using Crystal 2008)Hi Naveen,
You'll need to handle the logic in the Stored Proc's where clause.
If you're using oracle, I have something like this in the Stored Proc's where clause for our reports:
Where {Date_Field} Between
Decode('{?Relative Date}',
'Yesterday', sysdate - 1,
'Last Week', Tunc(sysdate, 'IW')-7)
AND
Decode('{?Relative Date}',
'Yesterday', sysdate,
'Last Week', Tunc(sysdate, 'IW'))
where 'Relative Date' is a prompt in the Stored Proc and 'yesterday'. 'last week' are the 'static values' in the prompt.
-Abhilash
Maybe you are looking for
-
Outputting DVI to HDMI input in LCD TV versus using the DVI to RGB ?
I am thinking of buying a mac mini to connect to a Toshiba 20HL85 TV in the lounge primarily to act as a "media server" and accessing Front Row for music, photo's, DVD watching etc. The question is which connection to use to go from the mini to the T
-
>I am looking at the c and I can find much for in car devices like ?all in one holders?. Belkin to a fantastic range for the ipod but yet im finding it hard to get something that is designed for any creative mp3 player! If anyone could let me know if
-
Using CF8. I'm creating a report using cfdocument what will export as a PDF. I want the report to look like the following: Vendors Within the City comm_cd sub-heading vendor name address loc_code vendor name address loc_code comm_cd s
-
Help regarding uploading an xml file
Hi All I have to upload data from an xml file. I guess the function module SMUM_XML_PARSE can be used for achieving this. But can anybody please tell me the exact procedure to use this function module. The program is going for a dump showing a CALL_F
-
I used InDesign CS6 to design a fillable PDF form to be distributed via Adobe Acrobat Pro X. When testing, I have no issues with the form fields or digital signatures. However, for this form, we would like the recipient to be able to use the "apply i