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] Creating a column to cumulate value of other column in same report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Creating a column to cumulate value of other column in same report
 Login/Join
 
Member
posted
I have a query/report I am building.

I need to create a column that will be a cumulative count.

So, in this instance, it changes if one column is value 1 and if a second column equals a third then the second column value is put into the cumulative column.

Like, SEQ = 1, DLA = 12 and OTP = 12 therefore *** = 12

But if there are actually 4 delays associated with a unique train+date combination then I need to be able to cumulate the number like:

SEQ DLA OTP ***
1 4 25 4
2 6 25 10
3 2 25 12
4 13 25 25

Is it possible to create this column value within the InfoAssist report?

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 1 | Registered: June 22, 2015Report This Post
Master
posted Hide Post
quote:
it changes if one column is value 1 and if a second column equals a third then the second column value is put into the cumulative column.


What?!?!


This will get you going I guess:
TABLE FILE CAR
	SUM SALES/D12C
		COMPUTE CUME_COUNTRY/D12C = IF LAST COUNTRY EQ COUNTRY THEN CUME_COUNTRY + SALES ELSE SALES;
	BY	COUNTRY
	BY	CAR
	BY	SEATS
END


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Master
posted Hide Post
Oh, and welcome to the forum. Big Grin


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Guru
posted Hide Post
Glenn,

Yes, Welcome to the forum!

The answer from one of our very helpful members is code related - you can accomplish the same idea using the GUI tool.

Within the InfoAssist tool - take the example provided with the COMPUTE logic and add your fields as needed.
To add a calculated new field:
- click on "Data" tab in the top tool bar
- the field appears as Compute_1 - change to the example's CUME_COUNTRY
- change the Format if necessary
- in the blank space added the logic after the "=" in the example provided - the ";" is not needed

Based on the sorted fields the LAST command compares the current record to the previous record and then evaluates the IF / THEN / ELSE.

With the information provided by Dave and the InfoAssist steps above this should 'get you started'

Let us know how you are getting along with your report. We are all here to help out.

Thank you for participating in the Focal Point Forum.

Kind Regards,
Tamra Colangelo
IBI Focal Point Moderator


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
 
Posts: 487 | Location: Toronto | Registered: June 23, 2009Report 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] Creating a column to cumulate value of other column in same report

Copyright © 1996-2020 Information Builders