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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Setting objectives based on the info of previous months

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Setting objectives based on the info of previous months
 Login/Join
 
Member
posted
Posted May 09, 2012 09:19 AM
Hello

I want to make a report in which I can compare the information of 2 different columns (both columns belong to the same field).

Example

01/12 02/12 "COMPARISON COLUMN"
#Datefield1##Datefield1#

10 12 12/10
11 14 14/11
12 16 16/12
. . ./.
. . ./.
n n n/n

I have 2 issues

1.- I am using the report assistant cause I am not a developer so essentially I need to fix this with R.A.
2.- 01/12 and 02/12 come from a single date field converted to an MY format.

I´ve tried several things but none of them worked.

Is there a way to do this???

Regards


Webfocus 7.7.03
 
Posts: 12 | Registered: March 08, 2012Report This Post
Guru
posted Hide Post
Hi David,

I guess this is the same question from the PMF sub-forum. I replied to that one. I'll just go ahead and reply to this one too.

Your question is not very clear. Let me see if I understand it:
1.) You have 2 tables - one for the current month, the other for the previous month.
2.) Both tables have a field called DATEFIELD1.
3.) You want the DATEFIELD1 from the current month table and the DATEFIELD1 from the previous month table to appear on the same line in the report.

If that's the case, then use JOIN to combine the 2 tables and report on the resulting table.

Or, if the case is that you have one table and you have the current month as one record, then the previous month as another record in that table, you can sort the table on the DATEFIELD1 field, then use LAST function to refer to the previous month. Here's an example using the CAR file:

DEFINE FILE CAR
PRVCAR/A20=LAST CAR;
END
TABLE FILE CAR
PRINT CAR PRVCAR
ON TABLE PCHOLD FORMAT HTML
END

This message has been edited. Last edited by: Anatess,


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Member
posted Hide Post
Hello

I think I didn´t explain correctly. I just have 1 table (DATEFIELD1/HYYMDS). From this table I used the HDATE(DATEFIELD1/MY) to get my information displayed on a monthly basis. So I could see :

JANUARY FEBRUARY MARCH ....

1 2 3 ...

What I want to do is to create new columns next to JANUARY, FEBRUARY, MARCH ....... So that the column to the right of Febraury contains the number "1" that originally belongs to JANUARY. I want to make this because the values represent monthly sales and I want to set current month sales objectives based on previous months information. I tried to use the LAST function but it didn´t seem to work out for me. Maybe it is because I did´n apply the function to the right field (the fields I tried were DATEFIELD1 and SALES).

Hope this is more understandable.

Regards


Webfocus 7.7.03
 
Posts: 12 | Registered: March 08, 2012Report This Post
Guru
posted Hide Post
Sorry David, it's still not quite clear.

If you have 1 table with 2 fields with a master file description like this:
FILENAME=MYDATA, SUFFIX=FOC, $
  SEGMENT=MYDATA, SEGTYPE=0$
    FIELDNAME=DATEFIELD1, USAGE=HYYMDs, $
    FIELDNAME=SALES, USAGE=D12.2, $


And you report on that like this:
TABLE FILE MYDATA
PRINT SALES
BY DATEFIELD1
END


You'll get this report:

DATEFIELD1 SALES
----------------
JANUARY    1
FEBRUARY   2
MARCH      3

etc...


If you say:

TABLE FILE MYDATA
PRINT LAST SALES
BY DATEFIELD1
END


You'll get:

DATEFIELD1 SALES
----------------
JANUARY    0
FEBRUARY   1
MARCH      2

etc...


Now, the sample report you showed that looks like this:

JANUARY FEBRUARY MARCH
----------------------
1       2        3



Is something that would come out of an ACROSS statement. Is that the case? Then the same LAST function would work for it too if you say it like this:

TABLE FILE MYDATA
PRINT LAST SALES
BY DATEFIELD1 NOPRINT
ACROSS DATEFIELD1
END



You know, it might be easier if you just paste your master file and your code right here so we can understand what you're trying to accomplish.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Member
posted Hide Post
Hello Anatess

I cannot show you my code because I am not using dev studio (I am not a developer), I use the Report Assistant.

My report uses an across to display sales in columns. I can´t attach the excel file here so I don´t know how to explain what I want better. The report assistant has also limitations so I have to work under these conditions.


Webfocus 7.7.03
 
Posts: 12 | Registered: March 08, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Setting objectives based on the info of previous months

Copyright © 1996-2020 Information Builders