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     [CLOSED] How do I create a field that calculates current period activity?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How do I create a field that calculates current period activity?
 Login/Join
 
Member
posted
I need to calculate the current period activity in Dollars.

I have two fields I can use to create this calculated field:
1. GRANT_PERIOD
2. SUM_YEAR_TO_DATE_ACTIVITY

The name of the calculated field will be:
Current_Period_Activity

The user will enter one of the following parameters:
01
02
03
04
etc. through 12

I'm guessing I need to create a define. How do I write this so the output includes only activity in a single period?

This message has been edited. Last edited by: Kerry,
 
Posts: 9 | Registered: March 30, 2007Report This Post
Master
posted Hide Post
While in the shower I realised that I probably have misunderstood what you are trying to do...so here goes again.

Let's assume you have two database fields:
GRANT_ACTIVITY and ACTIVITY_DATE in YYMD format

DEFINE FILE whatever
YEAR/YY = ACTIVITY_DATE;
GRANT_PERIOD/M = ACTIVITY_DATE;
END

TABLE FILE whatever
SUM GRANT_ACTIVITY 
-* BY YEAR BY GRANT_PERIOD
WHERE YEAR EQ &YEAR AND GRANT_PERIOD EQ &GRANT_PERIOD
END

The comment line -* ... isn't necessary of course and won't produce any different result if GRANT_PERIOD EQ &GRANT_PERIOD, but would be useful if you wanted the year to date and changed the WHERE clause to:
WHERE YEAR EQ &YEAR AND GRANT_PERIOD LE &GRANT_PERIOD

This assumes your date field is a SmartDate. You should also get the book "(Almost) 1001 ways to work with dates in WebFocus".

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Expert
posted Hide Post
quote:
While in the shower

Thanks for sharing George .....

But a little too much information thanks Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
But I do some of my best thinking in the shower ! (What you didn't see is that I posted a completely different solution earlier and then realised I had misunderstood the request).

Patty - is this any help to you?


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report 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     [CLOSED] How do I create a field that calculates current period activity?

Copyright © 1996-2020 Information Builders