Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Compute Field -Sum value based on corresponding distinct value
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Compute Field -Sum value based on corresponding distinct value
 Login/Join
 
Member
posted
How do I create a Compute Field with the Compute Calculator that Sums a measurement on all records that have the same distinct degenerate dimension value?

Scenario: A Claim File can have many Claim Sub Parts associated to it, but a Claim Sub Part is only associated to one File. I need the Sum of Total Loss Paid for each Sub Part associated to the same File.

An example end result would be if a File has 2 Sub Parts associated to it, and each Sub Part has $5,000 in Total loss Paid,then the File Total Loss Paid field for the Sub Part is $10,000.

This message has been edited. Last edited by: FP Mod Chuck,


Application Edition
SQL Server
 
Posts: 12 | Registered: June 13, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Is this what you're asking for?
 
TABLE FILE CAR
SUM RETAIL
COMPUTE SED_RETAIL/D12=IF TYPE EQ 'SEDAN' THEN RETAIL ELSE 0;
BY CAR 
END 


WebFOCUS 8206, Unix, Windows
 
Posts: 1716 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Member
posted Hide Post
I am trying to create the Computed Field in App Studio Canvas. I do not want to add lines to the Text Editor. I want to be able to Insert a Compute Field and add the statement to the Compute Calculator within App Studio, and have the tool update the Master File Text on its own.

I also don't have an exact File Number to pass in the EQ statement. I just want the Sum of Total Paid Measurements for all of the records that have the same File Number


File ID Sub Part ID TTL Paid - SP TTL Paid - File
012345 012345010101 $5,000.00 $10,000.00
012345 012345020101 $5,000.00 $10,000.00


Application Edition
SQL Server
 
Posts: 12 | Registered: June 13, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Delana,
When we need to do something similar in InfoAssist, we often use a HOLD file to hold the totals by the Claim File Number and then join it back to itself if we need to show details.
Hope that helps.


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 142 | Location: Indiana | Registered: December 05, 2017Reply With QuoteReport This Post
Member
posted Hide Post
The Hold File was exactly what I needed. Thank you.


Application Edition
SQL Server
 
Posts: 12 | Registered: June 13, 2017Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Compute Field -Sum value based on corresponding distinct value

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.