Data Summary - Best Practices

0
I am summarizing sales data for a team that consists of multiple levels (Sales Rep, Sales Director, Regional VP, and VP).  The Sales Rep is a sum of their direct sales, the director is a sum of the sales rep sales, Regional VP is a sum of Sales Directors' Sales Reps, and the VP is a summary of their Region's sales. I have the choice of summarizing data using the direct sales object on each level, or summarizing the summary on each level (example: Regional VP is a summary of Sales Director's or a summary of individual Sales objects of all reps) Is there a best practice that should be used here for data integrity purposes?  
asked
2 answers
0

Hi Jeff,

Not sure if this is a best practice but you can summarize all levels using a retreive from database and the aggregate list function. The combination of using the retrieve and the aggregate list function will do an xpath sum function and wont return all objects to memory. So if you database allows it, you can write an xpath constraint for VP, Regional VP, Sales Director, and Sales rep which all result in you counting sales. 

So if I were you I wouldnt summarize summaries, I would always summarize sales records.

Hope this helps!

answered
0

My advise would be to create seperate entities where you aggregate all the data. This way when analyzing you do not retrieve the real data but always work with the seperate created entities and thus not slowing the application. Most of time these overviews can do some heavy data retrievals and if you do that on the actual data that might have some performance drawbacks for the application itself.

Regards,

Ronald

 

answered