Introduction to InterSystems DeepSee - InterSystems Documentation
Introduction to InterSystems DeepSee - InterSystems Documentation
Introduction to InterSystems DeepSee - InterSystems Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
The <strong>DeepSee</strong> Model<br />
3.7.1 Measures<br />
Measures refer <strong>to</strong> source data and aggregate it. That is, a given cell in a pivot table corresponds <strong>to</strong><br />
specific records in the database. If that cell displays a measure, the measure uses a specific field in<br />
those records and gets all the values of that field (one value in each of the associated records). It then<br />
aggregates those values and displays the result.<br />
<strong>DeepSee</strong> provides a set of aggregation functions, including sum, minimum and maximum, average,<br />
first date and last date.<br />
Measures can be used only as columns.<br />
3.7.2 Computations<br />
In contrast <strong>to</strong> measures, computations refer <strong>to</strong> data in other cells of the pivot table and use that data <strong>to</strong><br />
compute a related number.<br />
The expression for a computation uses Caché ObjectScript. A large selection of functions, macros,<br />
and special variables is available, and you can use any Caché ObjectScript expression. For example,<br />
you can create computations that do the following:<br />
• Compute the difference between two columns or two rows<br />
• Compute a cumulative <strong>to</strong>tal<br />
• Divide one column by another and display as a percentage<br />
• Use If-Then-Else logic <strong>to</strong> determine which number <strong>to</strong> display<br />
• Compute the <strong>to</strong>tal value shown in another column or row (or use this <strong>to</strong>tal within a more complex<br />
calculation)<br />
Computations can be used as rows or as columns.<br />
3.7.3 Au<strong>to</strong>matically Created Measures and Computations<br />
<strong>DeepSee</strong> au<strong>to</strong>matically creates the following measures and computations:<br />
• The Count measure is simply a count of the records in the base class (in this case, User.Orders),<br />
au<strong>to</strong>matically aggregated as a sum.<br />
• In addition, a cube au<strong>to</strong>matically provides a measure corresponding <strong>to</strong> each numeric dimension.<br />
Any such measure is au<strong>to</strong>matically aggregated as a sum.<br />
• The Total computation provides a <strong>to</strong>tal. When you use this computation as a row, a given cell<br />
displays the sum of all values in the column, as shown in the example after this list. When you<br />
use this computation as a column, a given cell displays the sum of all values in the row.<br />
22 <strong>Introduction</strong> <strong>to</strong> <strong>InterSystems</strong> <strong>DeepSee</strong>