As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I am writing a report, I have to show data for current period, and previouse three periods as follows:
Current Previous 1 Previous 2 previouse 3
I have a Time table I can pick periods from. How do you pick previous periods and how do you tell system whats current period?This message has been edited. Last edited by: Kerry,
TABLE FILE CENTORD
SUM
QUANTITY
BY HIGHEST 4 ORDER_DATE
WHERE ORDER_DATE LE '20011228'
ON TABLE HOLD AS H001
END
TABLE FILE H001
SUM
QUANTITY
ACROSS HIGHEST ORDER_DATE
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
This is the formate of table dim_Time_key FiscalYear Period Week 1 2004 01 1
Date CalendarYear FYPW FYP 2003-03-29 2003 2004011 200401
Date is dateformat, Period and week can be calculated from FYPW. I am trying to get TODAY - 7 as current period because my data gets updated every 7 days, so previous week is my current period and week.
I tried follwing but it didnt work Current = TODAY - 7 CURPERIOD = FYPW WHERE Current = DATE
Orignal question was: How do I get Current Period, Previous 1, Previous 2, Previous 3
Your period seems to be year and month from which you can subtract 3 to get the previous 3. How is week related to that? That should be the amper variable (e.g. &PERIOD_3) that you use in your WHERE clause. Do this part all in Dialogue Manager.
What you then need to do first is convert TODAY to your FYPW format. You can do that in a DEFINE. For instance:
DEFINE FILE CAR
CURRDATE/YYMD=&YYMD;
CURRFYP/YYM=CURRDATE;
CURRFYPI/I6YYM=CURRFYP;
CURRWK/W=CURRDATE;
CURRFYPW/A8=EDIT(CURRFYPI) || EDIT(CURRWK);
END
TABLE FILE CAR
PRINT CURRDATE CURRFYP CURRWK CURRFYPW
BY COUNTRY
IF READLIMIT EQ 1
END
I only used the CAR file as an example. After the date in the data file is reformatted, you can same something like this:
Arif, if you want usable suggestions, please give more information.
dim_Time_key FiscalYear Period Week 2 2004 01 1
Date Ca lendarYear FYPW FYP Enro 2003-03-30 2003 2004011 200401 50
Above are DB fields: Period is a field in my DATAbase. I have Fiscal periods. Current week is todays date - 7 days
I want to be able to accomplish following: 1. When user runs the report i want to sum enr number for current week and last weeks of previous 2 periods. Example: If i am running a reprot today i want week that ended on April 23rds numbers. I also want Marchs last weeks number I want Feb Last weeks numbers.
How do I get this accomplish. Makeing assumpion that Months are periods where periods are my Fiscal periods my fiscal year starts in July.
DEFINE FILE PERIOD_FILE
CAL_DATE/I8 = EDIT(DATE,'9999$99$99');
END
TABLE FILE PERIOD_FILE
PRINT
Enro
BY HIGHEST 3 FYP NOPRINT
BY HIGHEST FYPW
WHERE CAL_DATE LE &YYMD
END
Will this give you the current month plus the previous 2 months periods? You have to work out the CAL_DATE from the db2 field(DATE) so it can be comparable to &YYMD.
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008