Adding Totals to a Summary in Data Prep Studio
You can add subtotals and grand totals to a summary for selected key fields.
Subtotal lines are added whenever the value of the key field changes. In the illustration below, subtotal lines are added whenever the value of the Customer key field changes.
Note that subtotal lines cannot be added for the right-most key field in any summary.
By comparison, a total line sums up measure fields.
Adding subtotals to a summary
-
Select the summary you wish to add subtotals to and then click Edit Summary.
The Edit Summary dialog displays.
-
Click on the Edit icon located the to left of a key field to use as a basis for adding subtotals.
The Field Properties dialog displays.
-
In the Layout tab, go to the section marked AFTER each key value change and ensure that the box for Insert subtotal line is ticked.
-
Add blank lines if you wish.
-
If you wish, enter some text to describe the key field into the Text field provided.
-
You can also select additional options to display the key value together with the text:
-
Insert key value on the left of the text will display the key value before the text.
-
Append key value to the right of the text will display the key value after the text.
-
Key value is not included will not include the key value at all.
-
-
Click OK to close the Field Properties dialog and then click OK on the Edit Summary dialog.
Your summary displays with subtotal lines.
Adding grand totals to a summary
-
Select the summary you wish to add a grand total line to and then click Edit Summary.
The Edit Summary dialog displays.
-
Ensure that the box for Insert total line is ticked.
-
Modify the total label if you wish by replacing the text in the Label field.
-
Add blank lines if you wish.
-
Click OK on the Edit Summary dialog.
Your summary displays with the specified total line.
© 2024 Altair Engineering Inc. All Rights Reserved.