Right now, Nth
returns an error if the provided index is not found.
E.g. if my table has three rows, and I write the formula:
[My Table].Nth(5)
I will get this result:
However, if I’m trying to write a running total with Nth
I could approach it like:
thisTable.Nth(thisTable.Find(thisRow) - 1).ifBlank(startingValue) + thisRow.Amount
You would think this works, but since Table.Nth(i)
returns an error when i > Table.Count()
—rather than returning Blank
—it breaks. If it returned Blank
not only could this formula work, but it would also likely allow more efficient lookups, e.g.
Is there an elegant way to get around this?