Show actual values before current month and forecast values after
This is a tricky one (but I guess it will be easy for you clever guys out there), so my apologies for the heading.
Thanks for reading.
I need to build a report in BEx (BW3.5) that does the following:
I will get actual values and forecast values for a year, grouped per period.
But in the report, I don't want to display the actual and forecast values of every period.
I want to display the actual values for the past, and the forecast values for the future.
So, if we are now in period 6 (which is June) all the actual values must be displayed for Jan, Feb, Apr and May.
But from June onwards to December, only the forecast must be displayed for each month.
Is this possible?
Thanks in advance, points will be assigned
Rudolph
Edit: This might help. The actual value is based on KF 0AMOUNT, where value type = 10. The forecast is based on the same KF, value type = 20, version = F2
Hi Rudolph,
No need to write any code for this one.
Have done couple of forecast reports using following logic.
Hope historical data getting from R/3 & Forecast values from APO.
these are seperate 2 keyfigures.
1.created restricted key figure (keyfigure1) for historical values & drag drop time characterstic with off set till date (means offset -6 to 0)
2.created restricted key figure (keyfigure2) for forecast values & drag drop time characterstic with off set till date (means offset +1 to +6).
create calculated keyfigure Add up above(keyfigure1+keyfigure2) two restricted keyfigure.
Thnx,
Vijay Reddy.
Similar Messages
-
Creation of a Query to show the values for the current month and the last 12 months data.
Dear All,
Good day!
I have to create a Query with the below requirement.
I have to create a Query to show the values for the current month and the last 12 months data.
Can you please guide me how to achieve this ??
thank you,
Regards,
HemaHema
explain the exact problem..? as you mentioned you want to create query to show values for current month and last 12 months.. so I think you want to show values for 12 months from current data.. you can achive this by multiple way..
you can have selection screen and field with date .. and restrict based on system current date and 12 months before or you can handle this at your target.. .. I mean there are multiple ways to restrict data by date range..
for some more hints..
http://www.forumtopics.com/busobj/viewtopic.php?t=34393&sid=7fba465d0463bf7ff5ec46c128754ed6
http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/how-to-display-last-12-months-in-report-based-on-todays-date-3231850
http://scn.sap.com/thread/3217381
search on SDN you will get many other ways..
Thanks,
Bhupesh -
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 -
Time Dimension _ Report on Current month and previous year.TOTAL
Hi,
My Time dimension is as under .
July2013, Aug2013 ,......Jan2014,,,. June2014 = 2014.TOTAL
My requirement is to report based on context view along with previous period total (.TOTAL) values.
For example : If i am using CV as : 2013.JUL my report should show 2013.JUL & 2013.TOTAL
If i am using CV as : 2014.JUN my report should show 2014.JUN & 2013.TOTAL
Can anyone provide some direction to build the above scenario
Regards
KrishnaHi,
do you have the property YEAR in your time dimension filled out? If so, you could use EPMDIMENSIONOVERRIDE function together with an Excel cell.
Let me build an example:
Assuming your report has two columns, one for the current month and one for the total year. I would split this into two, one report per month, i.e. column. The first report will show the current period, the second the total. Somewhere in the header of your sheet use:
EPMDimensionOverride("001";"TIME";EPMMemberProperty(;EPMContextMember(;"TIME");"YEAR")&".TOTAL")
001 is the default ID of the second report.
BR,
Arnold -
Parameter for Current Month and Previous Month
I'm trying to create a parameter for current month and previous month based on the ex_date, but not sure what i'm doing wrong.
where ex_date = @SelectDate
I created a second dataset below for the values in the parameters.
SELECT Month(CURRENT_TIMESTAMP) AS 'Month', 'Current Month' as 'Current Month'
union all
SELECT Month(CURRENT_TIMESTAMP)-1 AS Month, 'Previous Month' as 'Previous Month'
Results
Month Current Month
3 Current Month
2 Previous Month
Once I preview it I get "Conversion failed when converting date and/ or time from character string" I changed the data type to "date/Time" but that did not make a difference. The date is convert (varchar(10), ex_date, 101) so looks like
11/12/2014.
I've also tried expressions like =month(now()) to pull current month with same error so i'm not sure what i'm doing wrong. Any ideas?i tired this real simple report
in the first dataset - my main report query - select name from sysdatabases where month(crdate())=@month
in the second dataset - select month(getdate()) as Month1
in the parameters - choose int data type and available values - select the second data set
in the first data set- add this parameter..( i am assumming you know this, since you have done)
in the preview you should get the drop down with current month number - 3
and if you run the report, it will display the database names that were created in march. remember we are no checking year, so will get all that were created in march across the years.
Hope it Helps!!
I'm looking to have the dropdown say "Previous Month" and "Current Month" as a option. I know how to get the information in SQL, but not sure how this translates or put into a parameter.
Current Month
list_date BETWEEN
DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
AND
DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) + 1, 0)
Previous Month
list_date between
CONVERT(varchar,dateadd(d,-(day(dateadd(m,-1,getdate()-2))),dateadd(m,-1,getdate()-1)),106) /* Last Month */
and
CONVERT(varchar,dateadd(d,-(day(getdate())),getdate()),106) -
How to display records based on current month and last month???
i have a query that want to display the data for current month and last month. when i try to view the reports, all the data/key figures is return all in 0.00.
i modify the variables for this current month and last month but still the results is the same. i could not see the data. any advise on how to modify the variables for this current month and last month? i am thinking my variables is wrong.
for the current month variable:
the type of variable is characteristic value, processing by customer exit, reference characteristic is calendar year/month.
thanks for all who are kind to help me here....Hi,
If you install the variables from BC correctly and they are in active state, you can use them directly use them. check for this month the total values at info cube is ZERO or some value. as you told you are getting ZEROS for your input.and check the data at cube level based on your query design, apply all restrictions, fileters and see do you get any data at cube level and compare with report. -
Hi Experts,
I need to create a report which includes records of current month and last 7 days of previous month.
I will get records of current month by this formula :- month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate)
Please tell me how to add the records of last 7 days of previous Month for the same report.
Thanks in Advance.Hi Ajay,
If you have more than a year data in your database then your formula will return wrong results. ie. If your data consist of 2012,2013,2014 data then below formula will return all 8th month data irrespective of year. So, you need to check year also here
month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate) and
Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate)
Now add Abhilash second statement in OR so, your formula should look like :
(month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate) and
Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate))
OR
Date({PROBSUMMARYM1.OPEN_TIME}) IN [DateAdd('d',-7,Maximum(LastFullMonth)), Maximum(LastFullMonth)
-Sastry -
Concept:
Every month i need to find the list of .rar files from the
E:/TempBackup directory from the different environments (remote desktop servers) and i need to delete the current month
.rar files alone from the respective (E:/TempBackup) directory. below is example files structure inside the
E:/TempBackup.
example:
zDROP_2014_08_31_Backups.rar
zDROP_2014_09_31_Backups.rar
zDROP_2014_10_31_Backups.rar
from the above list i need to delete the zDROP_2014_08_31_Backups.rar(current month) file alone and also logs should be capture for this deletion.
key words for this are zDROP and Current month and date.
i need a stored procedure for this concept. could you please help on this.Hello,
You can schedule an operating system task (Control Panel -> Schedule task) to either call a batch file or a PowerShell script.
Please read the following resources for examples:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/61373719-fffb-4d94-bdbe-7d8ed8620b44/delete-filesfolders-on-remote-servers-using-powershell?forum=winserverpowershell
http://www.networknet.nl/apps/wp/archives/943
http://jeffwouters.nl/index.php/2011/10/powershell-script-to-delete-files-older-that-a-week/
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Salary in the current month and the previous one
Hi
I have a table that stores payroll details like the following stracture
earn code
period from
period to
user_id
time
I want to do one report which displays both the salary of one employee in the current month and his salary is the previous one
Thank you for your helpyou might use the LAG-function to get the previous months salary. Hard to know, as you did not provide any information about your report and database versions.
-
How to get current month and last month dynamically??
how to get current month and last month dynamically
like
month = getCurrentMonth();
lastmonth = getcurrentMonth() -1;
please help
thankshi :-)
/* depracated but can be still useful */
java.util.Date dtCurrent = new java.util.Date();
int month = dtCurrent.getMonth();
int lastmonth = dtCurrent.getMonth() - 1;
System.out.println("* " + month);
System.out.println("* " + lastmonth);
/* better to use this one */
Calendar cal = new GregorianCalendar();
int imonth = cal.get(Calendar.MONTH);
int ilastmonth = cal.get(Calendar.MONTH) - 1;
System.out.println("*** " + imonth);
System.out.println("*** " + ilastmonth);
regards, -
How to create a function to get the 16th of the current month and the 15th of the next month
I need to create a function to get the 16th of the current month and 15th of the next month to use it in the fast formula to calculate the sick leave.
Example:
If an employee takes a sick leave from 16 feb 2015 to 17 feb 2015 , I want it to affect march's payroll not February.
Please help and thanks in advance.Below statement gives you the result. Use the concept and write your PL/SQL function.
select TO_DATE('16-'||TO_CHAR(SYSDATE, 'MON-RRRR')), TO_DATE('15-'||TO_CHAR(add_months(SYSDATE, 1), 'MON-RRRR')) from dual;
Or you can use same construct directly in the fast formula by changing syntax accordingly.
Regards,
Peddi. -
Current month and Previous Month
Hi, I have the table shown above. I m trying to get output something like I need current month total amount and the total of the previous month. Can someone please help on this? THank you
ID PreviousMonthTotal CurrentMOnthTotal
1 3000 3000Please say your @@version,
on
Microsoft SQL Server 2012 (SP1) - 11.0.3412.0 (X64)
Mar 2 2014 01:25:09
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: )
query show ZEROS.
DECLARE @TEMP as TABLE
id int,date_t datetime,amount int
INSERT @TEMP (id,date_t,amount)
VALUES (1,'20150112',1000)
,(1,'20150212',1000)
,(1,'20150122',2000)
,(1,'20150202',200)
,(1,'20160112',41000)
,(2,'20150112',1001)
,(2,'20150212',1003)
,(2,'20150122',2004)
,(2,'20150202',205)
,(2,'20160112',41020)
,(2,'20160212',11200)
,(2,'20140122',201)
,(2,'20140202',20)
SELECT ID as [Cust Ref]
, SUM(CASE WHEN Date_t = dateadd(MM,-1,getdate()) THEN Amount ELSE 0 END) as [Total LAST Month]
, SUM(CASE WHEN Date_t = getdate() THEN Amount ELSE 0 END) as [Total This Month]
FROM @temp
GROUP BY ID -
Current month and previous months of fiscal year period data
Hi All,
My requirement is end user will enter month ie (fiscal year period ) and in report my requiremnt is to show data in two columns 1.Current month data and
2.April till date.
Please let me know how to do this and please send the coding to be done in CMOS.
RegardsHi,
In your query, you should have following object :
in filters:
fiscal period object, with an user entry variable on it (UE_MONTH)
in rows/ratios:
Current month column, with your KF and a restriction on 0calmonth2 with an customer exit variable on it (ie: CE_VAR1)
same for April column. (CE_VAR2)
in your customer exit, CMOD, step 2, add these two cases :
WHEN 'CE_VAR1'.
READ TABLE i_t_var_range WITH KEY vnam = 'UE_MONTH' INTO
intern_range.
CONCATENATE intern_range-low(6) sy-datum+4(2) INTO l_s_range-low.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
Same for April, add a new case and just replace sy-datum+4(2) by '04'.
Hope it helps, -
Hi,
I have a Time Reporting site where users log in their time twice a month.This site uses only Out Of Box functionality. There is no scope for coding in my site.
In the list i have created a view which shows the Time Report of the user logged in for the current month only.
There is a new requirement : Current month's Time Report should be visible to the users in the next month for 5 starting days of the month only so that users can edit this month's Time Report in the next month's 1st 5days incase they forget to edit it in
the current month.
e.g: If i am absent on the last day of the month , my time report for this month(March) should be visible for 5 days in April so that i can stiil edit March's time report. However after 5days the Time Report for March should not be visible. After 5days only
April's time report will be visible when submitted(April's time report).
Please can anybody help me out with this.
Regards ,
GuruHi Guru, you have a couple of options: 1) set a retention schedule through the list's settings> Information Management Policy Settings. Where the start date < start date + 35.
2) create a view and filter by the date like above.
These aren't perfect scenarios, but will get you close to what you want.
cameron rautmann -
SQL Query-return current month and the same month of last year
hello-
I would like to display the current month name, count of errors, year, and month number for both current year and previous year. Having trouble getting my query to display as following.....
Month CountofErrors Year MoNo
January 57 2015 1
January 155 2014 1
thank you!Its hard to answer without DDL and DML and sample data.
Give a try
select DATENAME(month,getdate()),Month(getdate()),YEAR(getdate()) ,COUNT(*) from dbo.errortable
where DATENAME(month,getdate())='January' and YEAR(getdate()) in(YEAR(getdate()),YEAR(getdate())-1)
group by DATENAME(month,getdate()),Month(getdate()),YEAR(getdate())
--Prashanth
Maybe you are looking for
-
I have two database fields, "Month" and "Year" which will be combined in a formula for the purpose of a chart. (eg: "{Table.Month}" and "{Table.YEAR}" = January 2008) My question is, if I use a line chart, how can I have Crystal sort the Month/Year p
-
Pricing approval process in SD
Hi All, I have a business requirement as below: 1) Whenever any new condition record is maintained using t-code VK11 and ZSD01(Z Transaction for maintaining specific pricing), it should trigger mail to respective authorised manager for approval. 2) T
-
Hi friends, I am a new user of oracle. Is there a feature in oracle which enables me to encrypt my procedure. If so how can I achieve that. Thanks in advance Thanks Glady
-
HT1338 how to update from 10.6.8
how do i upgrade to 10.7 or higher from 10.6.8?
-
The flash for my camera does not work with the camera or with a flashlight app. New iPhone 4. Any suggestions?