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

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
Decode Function
 Login/Join
 
<rstull>
posted
I am working on a report in which the data I am reporting against contains parent/child relationships. Each child is tied to its parent through a numerical code. Each child also has its own numerical code. I am trying to achieve a report that will show sales information for all of the children of a particular parent. I have set up a decode similar to below:

COMPUTE Child/A20 = DECODE Parent (111111 'GROUPNAME1' 222222 'GROUPNAME2' 33333 'Groupname3');
AS 'Child Group'


The problem I am encountering is that each parent may have several children, so there is a separate entry for each child of a parent. Is there a way to summarize all of the children of a parent to create one entry per parent code, while totaling and displaying the sales figures for the entire group? For example

Child Group Total Sales
GroupName1 $500,000
GroupName2 $600,000
GroupName3 $10, 000

Thanks!

Rachel
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Rachel,

Have you tried using a define for the child group rather than a compute? Then sum by the group.

DEFINE FILE XYZ
CHILD/A20 = DECODE.....
END
TABLE FILE XYZ
SUM SALES BY CHILD
END
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
This type of report is handled in the
Developer Studio option in Report Painter called
the FML (financila modeling language) where lots
of parent/child relations occur (account parent to child accounts in GL) .
See the Documentation on how to use this feature.
 
Posts: 226 | Registered: June 08, 2003Reply With QuoteReport This Post
<rstull>
posted
Thank you both for the advice! I'll be working on it this morning.
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 


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