Professional Documents
Culture Documents
3 Solutions 7-75
The Cumulative operator works only with date or datetime data items.
d. Create a new advanced aggregated measure (Aggregate Profit) that calculates a running
total for Profit over the countries.
1) In the left pane, click Data.
2) Select New data item Calculated item.
a) In the Name field, enter Aggregate Profit.
b) In the Result Type field, select Aggregated Measure.
c) On the left side of the window, click Operators.
d) Expand Aggregated (tabular).
e) Double-click AggregateCells to add it to the expression.
f ) For the Aggregation Type operator, verify that _Sum_ is specified.
g) Right-click the number field for the Measure operator and select Replace with
Profit.
h) For the Direction of Aggregation operator, verify that default is specified.
i) For the Starting Point of Aggregation, select start and 0.
Copyright © 2020, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-76 Lesson 7 Creating Advanced Data Items
j) For the Ending Point of Aggregation, verify that current and 0 are specified.
The expression should resemble the following:
k) In the upper right corner of the window, for the Format field, click (Edit).
(1) In the Format window, expand Currency (basic).
(2) Select Dollar.
(3) For the Width field, verify that 12 is specified.
(4) For the Decimals field, verify that 2 is specified.
(5) Click OK.
l) Click OK to create the new periodic aggregated measure.
The Data pane should resemble the following:
Copyright © 2020, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.3 Solutions 7-77
Copyright © 2020, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.