I am trying to make a box plot of data in Spotfire that tracks the median/distribution for the top 10 most active compounds discovered in a drug discover project to date. For example, imagine we had the following (abbreviated) data table:
Cmpd_ID, Potency, Date_Collected
Cmpd_001, 4.6, 2023-09-28
Cmpd_002, 4.7, 2023-09-28
...
Cmpd_026, 6.5, 2024-01-26
Cmpd_027, 6.4, 2024-01-26
...
Cmpd_052, 5.6, 2024-02-25
Cmpd_053, 5.2, 2024-02-25
...
Cmpd_179, 8.7, 2024-04-19
Cmpd_180, 7.2, 2024-04-19
Cmpd_181, 7.5, 2024-04-19
As you can see, I have a list of compounds ordered by the date in which their data was collected. I would like to generate a box for each collection date which shows the mean/distribution for the top 10 compounds collected to date. So for the first box (2023-09-28), the 10 most potent compounds would be identified from just that first batch. The second box (2024-01-26) would identify compounds from both the first batch and the second batch. The last box (2024-04-19) would identify the top 10 compounds across all batches collected to date. The result would look something like the below plot.
Any ideas how to accomplish this?
I can find values like “Max” with a custom y-axis expression like:
Max([Potency]) OVER (AllPrevious([Axis.X]))
…but I can’t seem to just return the top 10 compounds discovered to date