Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameanalysis
nopaneltrue

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:

  1. Hover over Customers in England, and press 
    Insert excerpt
    _table_new
    _table_new
    nopaneltrue
    .
  2. Give the new table the Name: Customer Summary by Region
  3. Insert excerpt
    _save
    _save
    nopaneltrue
     the table settings.
  4. Double-click on the new pipe to open the details formpipe between your Customers in England table and Customer Summary by Region table to open its settings.
  5. Go to the Sort/Group section:
    Open
    • Press
      Insert excerpt
      _attributes_show
      _attributes_show
      nopaneltrue
       to open the list of attributes, and drag the attribute Region into the list of Sort/Group attributes for the pipe.
  6. Go to the Aggregate Attributes section:
    1. Press 
      Insert excerpt
      _add
      _add
      nopaneltrue
       to add a new aggregate attribute In the new aggregate attribute formand set:
      • Set the Aggregate Function to : Count
      • Leave the Attribute blank
      • Set the New Attribute Name to : CountRecords
      • Press 
        Insert excerpt
        _finish
        _finish
        nopaneltrue
        .
    2. Add another aggregate attribute:
      • Press 
        Insert excerpt
        _attributes_show
        _attributes_show
        nopaneltrue
         in the Aggregate Attributes section.
      • 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
          nopaneltrue
          .
    3. Add another aggregate attribute:
      • Press 
        Insert excerpt
        _table_attributes_show
        _table_attributes_show
        nopaneltrue
      • Drag the attribute BILLAMOUNT into  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
          nopaneltrue
          .
Now you need to configure

Configure your output table

and run analysis:

  1. Drag the attribute Region from the Sort/Group section of in the pipe settings onto the table Customer Summary by Region in the model.
  2. Drag the aggregate attributes you added from the Aggregate Attributes section of the pipe onto the table Customer Summary by Region.
  3. In the main pipe configuration formsettings, press 
    Insert excerpt
    _finish
    _finish
    nopaneltrue
    .

Run analysis

  1. Run analysis on on Customer Summary by Region.
  2. View the data in this table – check that the aggregated report has been generated correctly., like the image below:
  3. Image Added
  4. In the model window, click 
    Insert excerpt
    _save_saveModel
    _save_saveModel
    nopaneltrue
    .