Position within group based on ascending sorted date column

Hi,

Here is a table without any sorting:

formula for Position Within Group:

I need correct looking column(Position within group) based on ascending sorted date column:

Help me please!

Here are some related topics:

Here is the doc:

@11177

I added a yellow column to your doc. Is this what you’re after? Try un-sorting and re-sorting the date column and watch what happens to the values in the yellow column.

1 Like

@Ander Thanks a lot! The solution was easier than I thought :laughing: :smiley:

1 Like

@Ander
Can you please share the formula you used to solve this?
The OP’s embedded doc is gone, so we cannot reference your solution.

Many thanks.

Hi @Matthew_Grant :blush: !

I can only guess (so I could be wrong :innocent: ) but I think this would work :blush:

thisTable.Filter(
  CurrentValue.Groups = thisRow.Groups 
  AND CurrentValue.Date <= thisRow.Date
).Count()

… to get a position within a group for dates sorted as ascending :blush:

And this…

thisTable.Filter(
  CurrentValue.Groups = thisRow.Groups 
  AND CurrentValue.Date >= thisRow.Date
).Count()

… would be for the other way around (i.e.: position within a group for descending dates)

See the sample below :blush:

1 Like