Rollups and Trebuchet

Okay. It’s quite late here, so I might not be thinking too clearly, but let’s give it a go anyway :slight_smile:

I think you might need a Helper Table, with enough rows to cover the maximum number of items expected in any given day.

You could set it up as follows:

  • Start by numbering the rows in the helper table, starting at zero
  • Next add a Query column that targets the Trips table, and apply the following filters:
    – Trip Date is within Selected Date (obviously you’ll need that value in the Helper Table)
    – Crew includes User Profile->UserID
  • Next you want all the Items across all trips for that day. So create a Joined List column that targets the Items column in the Trips table via the query column.
  • Convert that to an array using a split text column.
  • Now you want to transpose that array into rows, with one item per row. Use a Single Value column, that takes the row number from the start of the array.
  • That should give you one long list of items.
  • So now back in your SKU table, you can create a multiple relation to that column, and then do a rollup through that to get a count of each item

That should do it, I think.