Visokio website     Downloads     Video tutorials     KnowledgeBase  
Aggregation: category data and multiple selections? - Visokio Forums
Aggregation: category data and multiple selections?
  • mmor September 18, 2013 10:59AM
    Hi.
    I have created a file which is the result of a one-to-many merging process. The merged data looks like:
    Italy,5,Rome,10
    Italy,5,Milan,8
    Italy,5,Naples,7
    UK,6,London,15
    UK,6,York,4
    UK,6,Bath,3

    I want to create a Table view that sums data at the "country" level.
    For example, in a Map view I want to select UK and show in my table:
    6 (UK value) ,22 (the sum of 15,4 and 3).

    But if I select both UK and Italy, I want my table to show:
    11 (6 + 5), 47 (all cities added).

    At the moment, if I create my aggregate at the "country" level, in my table I have 2 entries:
    5, 25
    6, 22

    While if I don't aggregate at the country level, my table shows:
    33 (6*3 + 5*3), 47.

    What am I doing wrong?
    Thanks
  • 2 Comments
  •     paola September 18, 2013 11:23AM
    When aggregating on the [Country ] field you would like to use Mean or Singleton function for each category, but Sum function for all records summary row... Currently it is not possible to set different behaviour for one field in the two cases.
    You could add a new field with formula
    SUBSET_MEAN([Field1], SUBSET([Country]))  
    in aggregation tick [Month] and choose Mean function for this field.
    From the Group menu tick 'Show overall summary row' to see the total.
    (make sure that in the field options Grouping value function is Sum.
  • mmor September 18, 2013 12:02PM
    Hi Paola.
    But if I do a Mean aggregating by Country, if I select both Italy and UK my table shows:
    5.5 (6+5 divided by 2) instead of 11 (the sum).

    Or have I misunderstood your example?

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Tagged