Query problem (actual year vs previous year)
Hello All.
I need to create a query which gaves me the comparison incost center posting (with out cost center detail) between actual figures and last year figures. The problem is that for the last year figures I have to select ONLY those cost centers which have any posting in this year.
The layout of the query is in a daily basis for a full month, divided in weeks (this is done by structures, since the comparasion is done via weekday, not day number). (ex: from 1 to 31 of august)
Does any one have an idea?
Thanks all.
Hi Javier,
what about creating a new calculated key-figure that is multiplying last year value with 0 if there is no posting this year and with 1 if there is a posting this year. If you suppress zero lines, you will only see the cost centers with postings this year.
You need a restricted key figure showing the posting this year, let's call it Z1. Z2 are the postings of last year.
Then you create a new calculated key figure Z3 with the formular Z3 = Z2 * COUNT (Z1).
You can find the function COUNT in the Formular editor under Data Functions ("Value = 1 if operand <> 0, otherwise 0")
Hope that helps
Stephan
Similar Messages
-
Capturing "Actual Amounts" from previous years
Hi Experts,
We had earlier developed a report to produce a list of projects which can be changed from status TECO to CLSD. If the project cannot be closed then the corresponding reason for failure should be displayed.
Now the problem is that there were some direct costs which were booked under certain WBS elements. These elements were created in the previous year & haven't been settled in that year. Our present program isn't able to capture & display these costs in the current year. We have based our logic up on a join of table COBK with tables COEP, PROJ & PRPS. We are referring to the SAP standard TCODE s_alr_87013533 which is able to find the unsettled dollars (Actual amount) even from previous years. Anyone please help advise as to how we can even capture the actual amounts from previous years.
Regards,
Uday
Our inner join statement is as shown below:
SELECT coep~objnr coep~wogbtr coep~megbtr coep~wrttp coep~kstar
coep~owaer coep~vrgng coep~sgtxt coep~ebeln coep~ebelp
coep~objnr_n1 coep~belnr coep~gjahr coep~perio
cobk~blart cobk~refbn cobk~refbk cobk~refgj
INTO CORRESPONDING FIELDS OF TABLE tb_actual
FROM coep INNER JOIN cobk ON cobk~kokrs = coep~kokrs AND
cobk~belnr = coep~belnr
INNER JOIN prps ON coep~objnr = prps~objnr
INNER JOIN proj ON proj~pspnr = prps~psphi
WHERE proj~pspnr = wa_proj-pspnr "project definition
AND prps~pspnr = wa_prps-pspnr "WBS element
AND prps~belkz = c_x "Account assignment
AND coep~wogbtr <> 0 "amount
AND coep~lednr = c_00 "Ledger (needed to hit index)
AND coep~wrttp IN (c_04, c_11) "actual value type - real & stat
AND coep~beknz IN r_beknz. "D/C Ind <> Settlementbased on the data provided -
I-001688
Cost line 7143.28 71710000
Cost line 42874.74 73120000
Cost line 22752.77 73120000
TOTAL COST 72770.79
Settlement line 65627.51 81650000
Settlement line 7143.28 81650000
TOTAL SETL 72770.79
you should be able to set CLSD to this project as there is no unsettled value in the project
CJI3 report confirms that there is no outstanding settlement and hence project can be set to CLSD. This report shows all the line items against project
The report S_ALR_87013533 shows the actual cost incurred in the project, but not settlement. This does not mean that the project is unsettled.
see another report (project cost element report) - that might help you S_ALR_87013542 -
Parameter for current year and previous year
Hi all,
I currently have 2 reports where the query is the same except in the where clause I have it filtered to current year and previous year based on the List_Date. I would like to make this one report with a parameter of Current or Previous year.
Would I create 2 more datasets one for current and another for previous? I would think there is a easier way. Any help or direction would be great.If you define a parameter in SSRS, you can use it's value in your query. Just make sure the parameter name, and CASE (SSRS is case sensitive when it comes to parameters) are the same in SSRS and your query. There's a parameter tab on the dataset properties.
It SHOULD auto fill, but it never hurts to check, just in case.
Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.
Yes it did auto fill the parameter tab in the dataset and I get a parameter to enter the year when I preview the report. Still a little confused on how I do current or previous year. Are the next steps what I need to do?
@yearParam parameter:
1) Create Available or Default values
2) Current and Previous year as label
3) For Value do I need to use a expression for current year =Year(now()) and previous Year?
4) Add a filter on the tablix for list_date? -
Displaying current year and previous year's data.
hi all,
we have fields like doc.no, company code, costcenter, posting date, year etc... in a query.
we are using this query to display data in VC,
how can i display the current year and previous year's data in two different tables using the available fields.
any help will be highly appreciated.
thanks,
RkHi Rk,
You can achieve your requirement using 'Filter' operator. Drag one 'Filter' operator into visual composer story board and drag the output into filter and add condition(Check year=2008) and drag one table from filter. For another table use another filter and change the condition.
Hope it helps...
Regards
Basheer -
BEx - Display current year and previous year by day on the same row
Hello experts, need some help/suggestions on how I can accomplish the following please.
We have a requirement to show MTD revenue by day for the current year and previous year. The desired result will have the following columns
Calendar Day | Current MTD Revenue | Prev MTD Revenue
11/01/2009 | 15,131,005 | 15,138,668
11/02/2009 | 15,055,345 | 15,523,762
However, the result is showing up as follows:
Calendar Day | Current MTD Revenue | Prev MTD Revenue
11/01/2008 | | 15,138,668
11/02/2008 | | 15,523,762
11/01/2009 | 15,131,005 |
11/02/2009 | 15,055,345 |
The number of rows for Calendar Day varies depending on the date the user selects. We only want to display the days for the current year with the Previous Year Column on the same row.
Can someone please let me know how I can get the results to display on one line for each day?
Thanks,
DavidI have the same issue on my end, and am interested in responses. I searched the forum and found this suggestion in another post; not sure if this solution will help, but it looks like it might. This was a response from poster RadhaN:
RadhaN
Posts: 390
Registered: 8/27/09
Forum Points: 876
Re: a simple query to show sales versus last year on daily basis/
Posted: Sep 21, 2009 9:53 AM in response to: Shlomi Weiss Reply
HI Shlomi
Create a virtual characteristic in your infoprovider that can calculate the day from calendar Day. In ZXRSRZZZ while adding code for this virtual characteristic use the function module DATE_COMPUTE_DAY to compute the day for every calendar day.
For calculating Sales Current year, create a restricted ky figure with Sales as the key figure. Add 0CalDay to this RKF and create a variable for this infoobject(Eg: ZCURYEAR) that will receive input from the user for the range of dates eg: 08/16/2009 - 08/22/2009.
For Sales Prior year, create another restricted key figure with Sales. Add 0CalDay to this RKF and add a customer exit variable. In the Customer exit code use the ZCURYEAR variable and offset it to prior year in both the upper and lower limits. This should work.
I hope this helps.
Thanks. -
Current year and previous year
Hi All Grus,
i have a one requirement user will give input 30.04.2009 . the output should show last ten days including user entered date like 21.04.2009 to 30.04.2009 for current year and previous year
this current year and previous should show column wise in row wise i need year like given below
user input: 30.04.2009
row column
21.04.09 22..04.09. 23..04.09 .............................................................. 30.04.2009
2009 100 200 300 ............................................................... 500
2008 200 300 600 ................................................................. 1000
Edited by: kek.uthayakumar on Aug 4, 2009 7:57 AM
Edited by: kek.uthayakumar on Aug 4, 2009 7:58 AMHi
You need to have customer exit variable on this calday and write code to obtain your logic. Search in SDN for sample codes:
enter information required in search forum SAP Business Explorer (SAP BEx)
Regards
Ravi -
Query - to calculate data for previous year
Hi forum,
I have a requirement to calculate
' Total number of complaints received current month last year / total number of complaints last year)*current year total complaints target.'
I have no of complaints as key figure.
Any ideas how to do it in query designer.
Thanks in advance.
Regards,Hi,
The requirement is user will select the month he wants to see the records.
Based on input I have to calculate
1. Records from same month previous year.
2. Total records last year and
3. Total records this year.
I just need 1 input variable. Please explain in detail.
Should i create 2 RKF for records of previous year and for records of this year.
regards -
KE30 with currnt year and previous year columns
I continually get memory low when I run a KE30 report. I have made some changes to see if I can determine the possible cause. What I noticed was the following: If the report is just for the current year and I look at KEDT the number of actual record read is approx 1,500,000. If the report is just for the prior year the actual records read is approx 1,800,00. If the report is for current year and prior year the actual records read is approx 9,000,000. 9,000,000 seem to be aprox the total number of PA records, i.e. the actual records is the total number of PA records.
This is a complex report with aprox 120 rows and 9 columns, reading record types F,D and B.
Has any one had a similar problem and that may be able to help.
Regards
Rob ViljoenI assume the other 6M records is years prior to the current year?
You have two options, investigate the selection criteria that results from the report, and try and stop it selecting the other 6M records as well. Something is happening in the report that contains both years, which opens up the net effect of the selection criteria.
I am certain that you will find something in the aforementioned. If not, try and split the report into pieces, where a summary report is called first, and then the user drilldown into the detail report. -
Key figure comparision between current year and previous year
Hello collegues,
I have created a WEB Intelligence report with key figure ROI (return on investment which is calculated out of three other key figures (capital, revenue and costs). I would now like to calculate the percentage period (year) differences between key figure ROI - between current year (month) and previous year (month).
Do I have to add coding within a key figure formula within WEBI Rich Tech client or within universe builder.
The key figures were extracted from SAP BW and added to a universe which is basis for WEBI rich tech client report.
thanks and regards,
ChristianHi Stratos,
so I see - i have to use the variable Editor and then define a measure and add coding in the formula field. Do you have an e-mail address ín order to send you the report and explain in more detail what I would like to see - here it is not possible to upload a report...
thanks and regards,
Christian -
Current Year and Previous Year (derived) data comparison
Scenario:
Dimension Table for Date:
-Current Year
-Previous Year
-and other date related fields
Fact Table:
-Sales (contains current year sales depending on the filter set)
*Filter on Year
Would anyone know how will I create a measure for Previous Year Sales?
So that whenever my report shows the current year (for example: 2009) data of my sales, I can also have a column that would also display the previous year data and it will automatically know that it would display the previous year data of the Current year displayed in my report.
Also, how to derive the percentage change of this 2 columns.
Year: 2009
Branch --- Current Year Sales (Sales from Fact table) 2009 --- Previous Year Sales 2008???
I want to add the Current Year Sales And Percentage Change of Sales in the Business Model/Mapping Section. so that it would be available in the presentation layer of Oracle Answers.
Thanks.
Edited by: user12074468 on Oct 16, 2009 4:38 PMUse column filters. Click on the fx button on your Sales column. Click on the Filter button. Now go to the Time.Year column you have and click on it. When the filter window comes up, click on Advanced and convert the filter to SQL. Now insert the Current Year column so that you have Time.Year = "Current Year" Click "OK."
Get another Sales column and put it in your workspace. Follow the above procedure except this time use th Previous Year column.
Now you have two Fact columns, one that filters for the Current Year and one that filters for your Previous Year.
Now for your variance, click on one more column and place it in your workspace. Click on the fx button. This time click on the "Column" button. You will see a list of your columns. From this, create the (Current Year)-(Previous Year)/(Previous Year)*100.00. In the Data Format tab, change the format to percentage.
You also have the option of creating the above calculations in the BMM layer too. -
Regarding month reports of current year to previous year comparision
Hi,
Can you kindly let me know that i have to develop report of Year 2010 of may report for sales, this inturn has to pick
last year 2009 of may report side-by-side at report., I heard have to write user exit variable to acheive this.,
Can anybody share the code to me.
Thanks in advance.Hi,
Using Customer Exit Code we can do it. Use offset values and do it.
Ex:
Create a Input Variable on Month . Then user will give value 05.2010.
Create new Selection in Columns and drag & drop Keyfigure and 0CALMONTH and restrict the 0CALMONTH with above Variable.
Create new Selection in Columns and drag & drop Keyfigure and 0CALMONTH and restrict the 0CALMONTH with above Variable and right click and set OffSet -1 which wil give data for 04.2010 Data.
Like that you need to use Customer Exit code to get 05.2009 data, see the examples in
http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
See under
Customer Exit Variables in BW/BI Reports
Thanks
Reddy -
Current year Previous Year in Query
Hi,
I have to get the results of current year 12 months( 12 columns) previous year 12 month( 12 columns) in one report.
Once the user gives the current year , how to automatically populate the previous year. The PY varaint can be used for all months of previous year.
Any thoughts on this, please let me know.As venkat said , using offset is the best option, rather than jumping directly to custom exit variable.
for e.g.
you report display is
net qty.............net qty
current year...... previous year........
bil1
bil2
so u intend to see the net quantity for current year and previous year.
Bring net qty... in Columns in query designer.
Now right click and hit Edit
Now bring in time chara. that u wish to use and want to create variable for.................
for e.g. say fiscal period....
Now hit fiscal period with right click andhit Restrict.
Go for Interval variable if already exist or else create a new one.
hit okey..
now in query designer in columns copy ur net quantity
now paste there again.
in Second net quantity u can hit edit.
now where fiscal period is there hit restrict
in dialog box hit Select offset.
As ur intention is for previous year, keep the offset value as -12
also restrict fiscal year variant in selection.....
hit okey
test it...
if this doesnot work
then go for custom exit.... -
Previous year figures in planning book
Hi all,
I want to show the previous year figures in the planning book.
According the help documentation of planning books it must be possible to add actual data and previous year figures (Demand Planning - Demand Planning Process - Planning book design - Planning book: "Add rows containing actual data from the current year and/or the previous year").
Actual data is easy by refering to 000 version. But how can I add previous year data?
Thanks for your help
JeanI think what it means is that if you go to the dataview tab in the Planning book design you can see a field called Initial Column.
If you use initial column you will be able to add all the buckets in the period previous to the first future period. Its not necessarily last year but previous periods.
(though i dont understand what you menat by seeing actual using 000 version)
It makes more sense in an SNP planning book for a KF like Stock
as the help says...
"The initial column covers the time span from 1970 until the beginning of the first future period minus 1 second. The data is read from a key figure that is stored in liveCache orders or liveCache time series. However, you can also populate this column with data using a macro, such as has been done with the Initial stock key figure in the standard Supply Network Planning data view.
Enter one of the following values:
Blank - No initial column
L - The initial column is displayed on the far left of the table.
R- The initial column is displayed on the far right of the table.
C - The initial column is displayed between the past planning horizon and the future planning horizon." -
Close budget for previous years
Hi,
The system Iu2019m working on has commitments management active, so when I create a purchase requisition or purchase order, the budget is affected. Iu2019ve noticed that the field that determines the year relevant for budget availability is the delivery date (EEIND).
So if I make a purchase requisition today, with a delivery date of 2007, for instance, it will affect the budget from 2007 year. I donu2019t want this to happen. Is there any way to u201Ccloseu201D the year budget and donu2019t allow any more values to affect the budget for previous years?
Thanks for any help.Hello,
Please check the budget profile.
In budget profile, you will have how many previous years or future years you can budgeted. Try to reduce one year for previous years.
Regards,
Ravi -
Hi ,
I've the data something like this :
Fiscal Year Fiscal Period Metric Inventory
2001 January Auto 3160561.67
2001 February Auto 2962785.92
2001 March Auto 3451301.7
2002 May Auto 3319819.79
2002 June Auto 3972317.49
2002 July Auto 3743610.69
2002 August Auto 3772486.83
I've a combo for fiscal year and based upon the year selection its data is displayed in a Pie chart
and when I select a particular fiscal year its previous year data and selected year data should be displayed in a pie chart.
How to capture previous year data?
Thanks
RamRam,
I will share the sample xlf file, you can contact me through my profile.
-Anil
Maybe you are looking for
-
Recording audio from device on server
I have some really nice audio recording gear hooked up to my computer, and I got a neat idea. I want to turn my PC into a web server and serve a flash application from it that allows a user to record audio from MY hardware (basically record the outpu
-
IE 8.0 forces Acrobat 8.1.3 to open in browser
I am running XP SP3 and recently upgraded from IE 6 to IE 8.0 . I had checked off Internet->"Display PDF in Browser" in the Acrobat 8.1.3 Preferences. So with IE6, the PDF link opened in a new window. With IE 8.0, even when this flag is checked off,
-
Hi all, the log of the BI_PROCESS_TRIGGER looks like - Job started - Step 001 started - Status F hal already been reported to instance.... - Job finished In the log of the Processchain in the rspc there is no log for this job. What tells me 'Status F
-
Can't Import Sony AVCHD Using Log and Transfer
HI I have been importing AVCHD footage from all kinds of cameras, mainly Panasonics for over 4 years now using Final Cut Pro 7. I just got a new Sony NEX-EA50 but when I try to import the footage using Log and Transfer, it does not show up. When I
-
Portege Z930 - "System" process: high CPU usage when on battery
I've got a Portg Z930. A process called "System" appears on the task manager when I unplug the PC from the AC. I'd like to know why is it using high CPU (from 9% to 18%) and keeping my temps above 70C. It's very annoying, not only because of the temp