How to sum on a line item not a list

Options

I would like to sum a line item based upon another line item that is not a list. So for example, I have the following:

In this case, bananas is able to be listed twice because it is under different parents/countries.

So I want to see the total for all bananas by summing based on the unique ref (which is not a list)

Best Answer

  • TristanS
    Answer ✓
    Options

    @RebeccaL I would create a flat list of the vegetables that is not associated to a country then perform a sum against that. The flat list of the vegetables would have the Unique Ref above as its code.

    So the list you currently have has a list structure as per below

    • Brazil
      • Bananas
      • Apples
    • China
      • Bananas
      • Plums

    I suggest you create a flat list (no parent hierarchy)

    • Bananas
    • Apples
    • Pineapples