MaxRow Initial Value Expression Help

Hi 

I am looking for an initial value expression for [Reps] & [Weight] columns, where the respect values are copied from the oldest row (i.e. MaxRow) DateTime of the [Started] column for the same [Exercise Name].

I managed to get close with the following expression, but I seem to be stuck on how to ensure the initial value is specific for the same exercise and not just the oldest (i.e. MaxRow) of the [Started] column, which is what my current setup on my app is doing. See last picture.

Skip2MiLu_1-1677440513209.png

Skip2MiLu_2-1677440743578.png

 

0 5 252
5 REPLIES 5

Steve
Platinum 5
Platinum 5

For Most Recent, try:

IFS(
  ISNOTBLANK([Exercise Name]),
    MAXROW(
      "Workout Exercises",
      "Started",
      ([_THISROW].[Exercise Name] = [Exercse Name])
    )
)

 

@Steve thanks for the help, but unfortunately the expression does not seem to what I need.

 

Would I not need to have two separate initial value expressions for the [Rep] column and another for the [Weight] column that indicate which column (I. E. [Rep] or [Weight]) value of the max row based on the [Started] column as well as if the [Exercise Name].

Example with reference to the excel table. 

I would like the following initial value result I had to select the following [Exercise Name] 

Barbell Bench Press [Rep]=15  [Weight]=43

Wide Grip Lat Pulldown [Rep]=11  [Weight]=34

I was thinking that maybe I should not be using the Most Recent virtual column implementation in my initial value expressions and maybe there is another less complicated option? 

 

 

In what way did my suggestion not work for you?

Hi @Steve 

So I intput your below expression in the initial values for both the [Reps] and the [Weight] columns.

IFS(
  ISNOTBLANK([Exercise Name]),
    MAXROW(
      "Workout Exercises",
      "Exercise Started",
      ([_THISROW].[Exercise Name] = [Exercise Name])
    )
)


I also experimented with asking ChatGPT for help on an expression.
Below is what it suggested.
It seems to be doing more or less what I want, but I am just not sure if it taking into account that it needs to use the row with max value for that particular exercise based on the max datetime value of the [Exercise Started] column and not just select the max row in gerneral.


MAX(
  SELECT(
    Workout Exercises[Weight],
	AND(
      	[Exercise Name] = [_THISROW].[Exercise Name],
      	[Exercise Started] < [_THISROW].[Exercise Started]
           )
  	)
    )

 
So I used both your expression in the [Reps] column
& ChatGPT expression in the [Weight] column.
This is the values I recieved.

Skip2MiLu_3-1678226524655.png

 

This is what I would like to happen
I not sure what you thoughts are?

Skip2MiLu_4-1678226524654.png

 

 

@Steve any idea on the above?

Top Labels in this Space