Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Transforming Table
 Login/Join
 
Member
posted
Hi Folks,
i want to make a short transformation of my table data.

first of all ive got a table file containing the following coloumns:

TABLE FILE TESTTABLE
....

Name | Value1 | Value2 | StartDate | EndDate | DurationMonth
------------------------------------------------------------------------------------------------------------
1 | x |y |03/2013 |05/1013 | 3

For each Month in DurationMonth, i will make a new Row, so that a new table look like this:

Name | Value1 | Value2 | DurationDate
-----------------------------------------------------------------------------------------
1 | x |y |03/2013
1 | x |y |04/2013
1 | x |y |05/2013

Maybe create a new table file SOURCETABLE to store the data.

Can you plz give me a short example how to make this.

Thanks


Webfocus 8.0.0.2
Windows 7 Enterprise
 
Posts: 12 | Registered: July 11, 2013Report This Post
Platinum Member
posted Hide Post
This post is very similar to what you are trying to achieve.

http://forums.informationbuild...=187102951#187102951


WF 7.6.11
Output: HTML, PDF, Excel
 
Posts: 123 | Location: UK | Registered: October 09, 2003Report This Post
Member
posted Hide Post
ive tried the code from darin lee:

-SET &ECHO=ALL;
-SET &BEGDATE='19910601';
-SET &ENDDATE='19910612';
-SET &NUMDAYS=DATEDIF(&BEGDATE,&ENDDATE,'D');
-TYPE &NUMDAYS
-SET &DAY=0;
DEFINE FILE TRAINING
COURSEEND/MDYY=COURSESTART+10;
BEGDATE/YYMD=&BEGDATE;
-REPEAT THISLOOP &NUMDAYS TIMES
DAY&DAY/YYMD=DATEADD('&BEGDATE','D',&DAY);
DAYCNT&DAY/I9=IF DAY&DAY GE COURSESTART AND DAY&DAY LE COURSEEND THEN 1 ELSE 0;
-SET &DAY=&DAY+1;
-THISLOOP
END
TABLE FILE TRAINING
SUM
-SET &DAY=0;
-REPEAT PRINTLOOP &NUMDAYS TIMES
DAYCNT&DAY.EVAL AS 'DAY&DAY'
-SET &DAY=&DAY+1;
-PRINTLOOP
END

works fine, but how can i put this in a graph?

greetings


Webfocus 8.0.0.2
Windows 7 Enterprise
 
Posts: 12 | Registered: July 11, 2013Report This Post
Expert
posted Hide Post
quote:
but how can i put this in a graph

It would have been helpful if you had mentioned that in your original post.

How about this:

...

TABLE FILE TRAINING
SUM
-SET &DAY=0;
-REPEAT PRINTLOOP &NUMDAYS TIMES
DAYCNT&DAY.EVAL AS 'DAY&DAY'
-SET &DAY=&DAY+1;
-PRINTLOOP

ON TABLE HOLD AS HOLDFORGRAPH
END

GRAPH FILE HOLDFORGRAPH
SUM
...
ON GRAPH SET STYLE
...
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Sry for that.
Im very new on Webfocus.
Is this graph editable?, because the greatest things were, if i can put some filters in it, so that a dashboard user can set the date range.

I will try it tommorrow, the first tries on building a graph on that today have all been failed, but i have made this directly in info asist.


Webfocus 8.0.0.2
Windows 7 Enterprise
 
Posts: 12 | Registered: July 11, 2013Report This Post
Member
posted Hide Post
Hmm i get this error:

SUM
-SET &DAY=0;
-REPEAT PRINTLOOP 11 TIMES
(FOC1851) DUPLICATE DASH REPEAT LABEL

Some Ideas?


Webfocus 8.0.0.2
Windows 7 Enterprise
 
Posts: 12 | Registered: July 11, 2013Report This Post
Virtuoso
posted Hide Post
You can't define the same label more than once in a procedure. Apparently you did.
That's what the error says, at least.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Member
posted Hide Post
thnx i will look at this.

at the moment this code produces one value for every day in the computed period.

for testing, i have expand the code to compte more than one value for every day like this:

...
DEFINE FILE TRAINING
COURSEEND/MDYY=COURSESTART+10;
BEGDATE/YYMD=&BEGDATE;
-REPEAT THISLOOP &NUMDAYS TIMES
DAY&DAY/YYMD=DATEADD('&BEGDATE','D',&DAY);
DAYCNT&DAY/I9=IF DAY&DAY GE COURSESTART AND DAY&DAY LE COURSEEND THEN 1 ELSE 0;
DAYCNTNEG&DAY/I9=IF DAY&DAY GE COURSESTART AND DAY&DAY LE COURSEEND THEN 0 ELSE 1;
-SET &DAY=&DAY+1;
-THISLOOP
END

TABLE FILE TRAINING
-SET &DAY=0;
SUM
-REPEAT PRINTLOOP &NUMDAYS TIMES
DAYCNT&DAY.EVAL AS 'DAY&DAY'
DAYCNTNEG&DAY.EVAL AS 'DAY&DAY'
-SET &DAY=&DAY+1;
-PRINTLOOP
END

so i will have a additional complement (only for testing, because later i will have 8 values for every day)

so i get a result like this:

DAY0 | DAY0 |.......
1 |40 |.......

in the graph i will put these 2 values for each day shown on DAY0 on the x axis.
But in the moment i am not able to create a graph with a single value.....
thats my 1st problem...

grettings


Webfocus 8.0.0.2
Windows 7 Enterprise
 
Posts: 12 | Registered: July 11, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders