Rank data in a table within categories based on date

I need to rank data based on entry date and 2 category columns. I am working with 4 columns , a date column, Category Column 1 which has option A or B , Category Column 2 which has sub categories and the rank column. The sub categories are added to the table when Category Column 1 = B

I would like the rank function to only apply when Category Column 1 = A and rank within a sub category with 1 being the earliest entry for that sub category.

Thanks

I’m not sure what you mean by “rank” in this context. I suggest you further elaborate on your end goal instead of using potentially ambiguous terminology.

If you’re wanting to sort your data by multiple columns in a Table or Deck view, you can simply set the Sort By here:

You can also order a list of row references in an expression, by any number of columns, with this expression:

1 Like

image

I have attached a table and a tree diagram. I would like the repitch # to be automated within a yeast line (the sub category) … only applicable when the [YM_Type] = Cropping

Yeast propagation and re-pitching huh? I picked the right thread to respond to this morning, I used to work at a brewery, haha :grinning_face_with_smiling_eyes:

Anyways. I think you’re asking how to get the app to automatically assign the repitch number for a new record, as in the last repitch number of the same strain (Source?), plus 1. Is this correct?

If so:

IF(
  [YM_Type] = "Cropping" ,
  MAX( SELECT(
    table[Repitch #] ,
    [Source] = [_THISROW].[Source]
  ))
  + 1 ,
  0
)
2 Likes