Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
By the end of this chapter you will be able to:
- Set up aggregate attributes on pipes
- Read aggregate attributes from pipes into a
...
- table
Set up aggregate attributes on pipes
In this exercise you will create a report of total and average last billed amounts, aggregated by Region
...
.
In your Introduction to Modelling analysis model, add a new
...
table:
- Hover over Customers in England, and press
...
.Insert excerpt _table_new _table_new nopanel true - Give the new
...
- table the Name:
Customer Summary by Region
the table settings.Insert excerpt _save _save nopanel true - Double-click on the
...
- pipe between your Customers in England table and Customer Summary by Region table to open its settings.
- Go to the Sort/Group section:
...
- Press
to open the list of attributes, and drag the attributeInsert excerpt _attributes_show _attributes_show nopanel true Region
into the list of
- Press
...
- Sort/
...
- Group attributes for the pipe.
- Go to the Aggregate Attributes section:
- Press
...
to add a new aggregate attributeInsert excerpt _add _add nopanel true
...
- and set:
- and set:
...
- Aggregate Function: Count
- Leave the Attribute blank
...
- New Attribute Name
...
- :
CountRecords
- Press
- :
...
.Insert excerpt _finish _finish nopanel true
- Add another aggregate attribute:
- Press
...
in the Aggregate Attributes section.Insert excerpt _attributes_show _attributes_show nopanel true - Drag the attribute BILLAMOUNT into the aggregate attributes list
- Note that this already uses the attribute function Sum – leave this as it is.
- Update the name of the aggregate value:
- Double-click on the new aggregate attribute.
- Update the Name to
TotalLastBillAmount
- Press
...
.Insert excerpt _finish _finish nopanel true
- Add another aggregate attribute:
- Press
...
Insert excerpt _table_attributes_show _table_attributes_show nopanel true - Drag the attribute BILLAMOUNT
...
- into the aggregate attributes list
- Update the details for this new aggregate attribute:
- Double-click on it
- Update the
...
- Aggregate Function to Average.
- Update the Name to
AvgLastBillAmount
- Press
...
.Insert excerpt _finish _finish nopanel true
Configure your output table
- Drag the attribute Region from the Sort/Group section
...
- in the pipe settings onto the
...
- table Customer Summary by Region in the model.
- Drag the aggregate attributes you added above, from the Aggregate Attributes section of the pipe onto the
...
- table Customer Summary by Region.
- In the
...
- pipe
...
- settings, press
...
.Insert excerpt _finish _finish nopanel true
Run analysis
- Run analysis
...
- on Customer Summary by Region.
...
- View the data in this
...
- table – check that the aggregated report has been generated correctly, like the image below:
- Image Added
- In the model window, click
.Insert excerpt _save_saveModel _save_saveModel nopanel true