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

0 3 216
3 REPLIES 3

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:

3X_4_9_4940323324022a95d1b1a85640c2187eba46e25d.png

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

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
)
Top Labels in this Space