Calculate values based on unique dates

Chiming in.

First of all, I think the fact that you can have multiple entries with the same date and number of rooms is the problem itself. And the best way to approach your need would be to get rid of duplicates in the table in the first place.

But let’s assume that for some reason it’s not possible. Logically I’d approach the problem in the same spirit:

  1. Determine if a row is a duplicate of already present row — I’d make a separate column for that
  2. Then calculate only rows that aren’t duplicates

Much simpler than @Pch’s approach :slight_smile:

In tasks like this, it’s always best to figure out what is causing complications to an otherwise trivial task, then find a way to eliminate them in the first step.