Should I save my calculation to the Dataset or the Pack?
Once you have identified the need for a calculation and created one that delivers what you need, you will need to save it somewhere. In Orgvue you can either save your expression to the Dataset or to the Pack. Regardless of which of the two approaches you take, the results of your expression will be the same. Figuring out where you need to save it will primarily come down to one question:
Do I need to use this calculation across more than one Pack?
- If across multiple Packs: save it as a Dataset property
- If only in a Single Pack: save it as a Pack property
Example scenario #1: you have created a Span calculation that should be visible in all your main reporting packs à Dataset Calculation
Example scenario #2: you have created a calculation that helps you with your Data Quality review and it should only be part of your dedicated Data Quality Review Pack à Pack Calculation
There is an additional question that, while not common, could also have an impact on your choice:
Should my calculation run only for new records? Or only if a cell is empty? (But not for any other records!)
Example: You want new records to be populated with a to-be cost from a rate card initially, which can be overwritten. All existing records already have this data populated so are out of scope of the calculation.
- Yes: Dataset Calculation
- No: Pack Calculation
There are some other considerations and best practices to consider:
Performance
- For calculations that need to run dynamically (not On-demand) and is for analysis that’s not used often, consider Pack properties instead of ‘weighing down’ the Dataset for each use-case.
Dataset cleanliness:
- If there’s already lot of properties in a dataset, a bunch of calculations can make managing the dataset tricky. Consider an On Demand “Populator” approach to combines multiple calculations and re-evaluates these when prompted.
Speed of work:
- A common approach to building and testing expressions is to save a calculation to your testing Pack while you are in the build and validation phase. Once you have validated the expression works as expected you can then decide where to save it.
Comments
0 comments
Please sign in to leave a comment.