To Display two previous months YTD-Actual columns from the current month
Hi All,
i want to create a FSG report in which i require three columns describing months one for the current month and two for the previous months in order like if i run report in Oct 06 then other columns will be Sep 06, Aug 06 is this possible?
if yes then how ??
i m using POI-2 and POI-1 which is giving wrong results.
thanks.
i got the solution:)
i was just assigning an offset to the cumulative column as well.
Similar Messages
-
How can i pull out data from a spreadsheet only from the current month?
Data is constantly being fed into a spreadsheet using a VI, this data comprises of such things as month, year, weights, std dev, etc. I want to do some data manipulation on the current months data while the VI is running, how can I pull out only the data relating to the current month? Each input into the spreadsheet stores the values for that run on one row, and there are perhaps 150 runs each month
Any thoughts are greatefully received
Thanks
Ross
Attachments:
Results.xls 1 KBHi Ross,
I thought I would go away and make you an example VI for the results xls that you have sent me.
Here it is: I have added a few comments here and there but if you need more info please don't hessitate to post back on the forum
Hope if helps
AdamB
National Instruments
Applications Engineering Team Leader | National Instruments | UK & Ireland
Attachments:
MonthExtract.vi 43 KB -
Help:Unable to get the Current Month Data
Hello Folks,
Hello Folks i have this scenario where i need to modify this code so that it has to return data from the Current month First Day to the previous Day if its a daily report and previous month data if its a monthly report.
BEGIN
if v_lowdate is null or v_highdate is null then
select to_number(to_char(sysdate, 'DD')) into v_cur_day from dual;
if v_cur_day < 25 then
-- this is for the previous month run
Select Add_Months(trunc(sysdate, 'MONTH'), -1)
INTO V_LOWDATE
FROM DUAL;
SELECT Last_Day(ADD_Months(Sysdate, -1)) INTO V_Highdate From Dual;
else
-- this is for the current month run
Select trunc(sysdate, 'MONTH') INTO V_LOWDATE FROM DUAL;
SELECT Last_Day(Sysdate) INTO V_Highdate From Dual;
end if;
end if;
I have replaced the above code with the code below but its still returning the previous month Data. Any help would be appreciated.
v_lob := get_admin_value(p_admin_procedure_name => 'CLIENT_DATAFEED_CODE',p_err_msg => v_error_text);
if v_lowdate is null or v_highdate is null then
v_cur_day := TO_CHAR (SYSDATE, 'DD');
IF report_type = 'D' -- Daily report
AND v_cur_day > '01' -- (except when run on 1st of the month)
THEN -- will cover from
v_lowdate := TRUNC (SYSDATE, 'MONTH'); -- 1st of this month to
v_highdate := TRUNC (SYSDATE - 1); -- yesterday
ELSIF report_type = 'M' -- Monthly report
OR ( report_type = 'D' -- (or Daily report
AND v_cur_day = '01' -- if run on the 1st of the month)
) -- will cover from
THEN
v_lowdate := ADD_MONTHS ( TRUNC (SYSDATE, 'MONTH')
, -1
); -- 1st of last month
v_highdate := TRUNC (SYSDATE, 'MONTH') - 1; -- last day of last month
END IF;
END IF:How are you testing this? It works for me, or at least generates the dates I think you want.
SQL> var fake VARCHAR2(25);
SQL> var report_type VARCHAR2(1);
SQL> exec :fake := '16-oct-2009'; :report_type := 'M';
PL/SQL procedure successfully completed.
SQL> DECLARE
2 v_cur_day VARCHAR2(2);
3 v_lowdate DATE;
4 v_highdate DATE;
5 fake_date DATE := TO_DATE(:fake, 'dd-mon-yyyy');
6 BEGIN
7 v_cur_day := TO_CHAR (fake_date, 'DD');
8 IF :report_type = 'D' AND v_cur_day > '01' THEN
9 v_lowdate := TRUNC (fake_date, 'MONTH'); -- 1st of this month to
10 v_highdate := TRUNC (fake_date - 1); -- yesterday
11 ELSIF :report_type = 'M' OR (:report_type = 'D' AND v_cur_day = '01') THEN
12 v_lowdate := ADD_MONTHS ( TRUNC (fake_date, 'MONTH'), -1); -- 1st of last month
13 v_highdate := TRUNC (fake_date, 'MONTH') - 1; -- last day of last month
14 END IF;
15 DBMS_OUTPUT.Put_Line('Low: '||TO_CHAR(v_lowdate, 'dd-mon-yyyy'));
16 DBMS_OUTPUT.Put_Line('High: '||TO_CHAR(v_highdate, 'dd-mon-yyyy'));
17 END;
18 /
Low: 01-sep-2009
High: 30-sep-2009
PL/SQL procedure successfully completed.
SQL> exec :report_type := 'D';
PL/SQL procedure successfully completed.
SQL> /
Low: 01-oct-2009
High: 15-oct-2009
PL/SQL procedure successfully completed.
SQL> exec :fake := '01-oct-2009';
PL/SQL procedure successfully completed.
SQL> /
Low: 01-sep-2009
High: 30-sep-2009
PL/SQL procedure successfully completed.John -
Please Help!!!
How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
January 2014 January
2013 +/-
Region Entry Exit Total Entry Exit Total (Total of Jan2014-Total of Jan2013)
A 2 3
40 5 7 30 40-30= 10What is a table structure? Sorry cannot test it right now..
SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
FROM tbl
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Running Sum on column total minus current month
Hi all,
Is it possible to get the running sum total value of all the months minus the current month value in the column function,as I need to display the same in the narrative view.
Like RSUM(YTD(M-1)Value)...
Presently this RSUM is not giving me the right value.
I can also do the total for all the months minus the current month value.Can it be done at the column funtion?
Regards
AshishHi
Can you elaborate a little..Did you mean I need to create one variable in the repository?
YTD (M-1 Value) / (YTD Last Year M 0 Value)
where M0 is current month and M-1 is previous month and value is a measure.
Regards
Ashish
Edited by: Ashish21473 on Jan 7, 2011 3:38 AM -
28th day of the previous month to 27th of the current month
Hi,
I am designing a report wherein the data should range from 12:01am on the 28th day of the previous month to 11:59 pm on the 27th of the current month.. This should be a dynamic one as this would be scheduled.
Any help will be greatly appreciated!
Thanks & Regards
BMCHi
Thanks for your reply and I have been using the same formula given by you but unfortunately it stopped giving the result. This is how i have given the syntax:
Create a new field name say From (this will calculate all the data of preceding month starting from 28th)
if not(month(CurrentDate)=1) then
date(year(CurrentDate),month(CurrentDate)-1,28)
else
date(year(CurrentDate)-1,12,1)
Creat an another field say To (this will calculate all the data of current month as of 27th)
if (month(CurrentDate)=1) then
date(year(CurrentDate),month(CurrentDate),27)
else
date(year(CurrentDate)-1,12,1)
Now create one more field say Time that will include the above two syntaxes.
{CHG_Change.Considered Res Time}>DateTime({@From}) and {CHG_Change.Considered Res Time}<=DateTime({@To})
This did work but seems now its not working.. Can you see if am missing out something here..
Regards
Cauvery -
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.
-
Hi ALL,
Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way .
For example :
file name is :subscribers (Cost) Sep13.csv is specified in the below path
E:\Accounting\documents\subscribers (Cost) Sep13.csv
here I need to fetch the "Sep13" as a Date column in the ODI 11g in the generalized way.
Can any one help us in this case as early as possible.I would suggest using a piece of Jython code for this. Something like this...
import os
import os.path
filelist = os.listdir(E:\Accounting\documents\)
for file in filelist:
datestr = file[19:-4]
You'd need to work out what to do with datestr next... perhaps write it to a table or update an ODI variable with it.
Hope this is of some help. -
I want to display my bookmarks in a vertical column whenever the browser is on, like IE does. How do I do this?
Also accessible via:
* View > Sidebar > Bookmarks (Ctrl+B)
Press F10 or press and hold the Alt key down to bring up the "Menu Bar" temporarily. -
CWB-Need to change the eligible salary column from yearly to monthly
Hi All,
I need to change the eligible salary column from yearly to monthly at Employee Allocation from Compensation Workbench.
Kindly help me guys
Regards,
SajidYou can change the activity reference period in the Plan Form - > Not In Program tab from annually to monthly. However, it will impact all the calcuations as it will use monthly values for everything. Please be careful of this. I would suggest testing this (along with posting back the increases to ensure they are annual amounts) before proceeding with this.
-
Can I run ck40n two times in the current month??
Hi,
I execute ck40n for June month, but after finish there was an activity price should be change,
so can i change and run ck40n again in the current month??Hi,
Somehow, I agree with Ali.
Though the system allows you to release more than once but it is not recommended as there will more one standard price available for the same material which may lead inappropriate variance calculation and other inconsistency may crop up. Further system will revaluate all the inventory value with the new price.
You can also change the price manually through MR21 (this is not recommended but it is a work around).
Regards
Mohit -
How to get the current month for a variable based on info object 0FISCPER3
Hie Gurus
I am working on the financial reports i am failing to derive the Current month from the variable based on infobject 0FISCPER3 PERIOD .
I would also like to get the same month from the prevoius year. Any ideas?If I understood correctly, you need in your repot
Current Month Plan This year || YTD Plan This Year || Current Month Plan Last Year || YTD Plan Last Year
Your variable 0I_FISCPER3 must be on the object 0FISCPER3 which is nothing but just the Fiscal Period. This variable is a user entry mandatory Interval variable.
if you are entering a range in the input screen for this variable, you will get cumulative values. If you just need to get the value for a month in first column your report, you will have to create another variable of type Customer Exit which will read the "To value" entered for the variable 0I_FISCPER3 and columns for Current Month should be restricted on this variable.
if you are entering a single value in the selection screen of this variable, current month column should be restricted on this variable with "Equal To" operation and YTD colmns should be restricted to "Less Than Equal to" operator with this variable.
0FISCPER3 just have posting period and not year, so you will have to use varialbes for 0FISCYEAR separately.
Please let us know if it helps or if you are using some other variable based on 0FISCPER3 or 0FISCPER.
Regards,
Gaurav -
i use ipad mini with retina display 16gb i love playing clash of clans but due to shortage of space i want to delete it for some days.If i delete the app and then reinstall it after a month should i start from the beginning or cont. from where i left
However, I originally had the kindle app on there and when he is reinstalling it comes up with my kindle account. How do we change this?
OPen teh Kindle app.
Tap the i at bottom right then Settings > Deregister this device.
-> http://www.amazon.com/gp/help/customer/display.html?nodeId=200375710&#managedevi ces
He does not have an actual kindle so I am not sure if he would be able to create one anyways.
The Kindle app is so you do not have to use a Kindle. Yes, he can have a Kindle account and not own an actual Kindle hardware device. -
PERSG previous bet different from the current PERSG using info-type pa0000
Hi Friends,
Please guid me how get the PERSG previous bet different from the current PERSG
using info type pa0000.
Regards,
DurgaFolks,
even after having repaired the inbox folder under "properties" a few times, I still had some e-mails where the contents are different from the subject line.
In other words in the inbox there are two e-mails: one with subject line "abc", and another one with subject line "def".
When I display the e-mail with the subject line "abc", the contents are from the e-mail with the subject line "def" in the in-basket.
What else can be done to correct this problem?
Thanks and best regards.
Fred Kunz-Shirzad
Chemin Ronzeures 6A
1297 Founex VD
Switzerland
[email protected] -
What is the definition of open orders for the current month ??
Hi all,
I need to calculate Net Sales for the open orders of the current month in my report.
Can you please tell me the condition required to be put on Net Sales for Open Orders.
Which characteristic is actually required? Should I restrict the Net Sales by the Overall Delivery Status of ordered items(0dlv_stso)?
With Thanks and Regards,
Mukul Singhal,
Software Engineer,
SAP-BW Practicehttp://www.apple.com/batteries/iphone.html look here Apple-batteries-iphone.
Maybe you are looking for
-
we have a Linux fileserver with Samba share and have several users. The users tend to be in different locations and need to login at different workstations, sometimes the workstation may be WindowsXP and othertimes it is windows7. How can we use Fire
-
Monitor issues with Macbook Pro and Thunderbolt
having issues getting my HP 2311 monitor to work on thunderbolt cable to DVI, help? It keeps freezing computer, or going blue screen.
-
Using a custom tag with a 2.3 servlet descriptor BUG?
Hi, I just developed a Custom Tag and I'd like to use in my jsps. If I add the jsp in my JDev project with the custom tag when I try to build the project I got this error: Error(11): oracle.xml.parser.v2.XMLParseException: Invalid element 'listener'
-
Wishing to transfer uTube tuts from Mac iTunes to new iPad mini
1.How to transfer uTube tutorials from Mac iTunes to new iPad mini? 2. How to transfer uTube tutorials from Mac to ipad mini Be grateful if you advise stwp by step how to undertake both the above. thank you Sue
-
Bipublisher desktop - report server
Hi, I am using bi publisher desktop on windows 7 with office 2010, I am trying to edit a templated generated from an R12 instance, before I can open the file I am prombted to logon. it prompts me for a username password and Report Server, how can I f