Hi.
I have a column [AM/PM Charge] in Table Operations_Master_Check and I want the initial value of this to be the same as the row in the table with the MAX() [Pre-Treatment Timestamp]. This MAX() timestamp is not necessarily the maximum row in the table so I cannot use MAXROW(). I tried a virtual column with App Formula MAX(SELECT(Operations_Master_Check[Pre-Treatment Timestamp],TRUE,TRUE)) and set the initial value in the [AM/PM Charge] column to [Max Pre-Treatment Timestamp].[AM/PM Charge] but I am getting the following error.
Column Name โAM/PM Chargeโ in Schema โOperations_Master_Check_Schemaโ of Column Type โEnumโ has an invalid Initial Value of โ=[Max Pre-Treatment Timestamp].[AM/PM Charge]โ. Error in expression [Max Pre-Treatment Timestamp].[AM/PM Charge]
Any help in the right direction on this would be great, thank you.
So how are you identifying it then?
This expression can be reduced to just:
MAX( Operations_Master_Check[Pre-Treatment Timestamp] )
Is [Pre-Treatment Timestamp] the key column of this table?
Thank you @Marc_Dillon
When I edit an existing record (the entire record is broken up into different slices) I want the Initial Values of some of the fields to be set to the same values as the record with the highest [Pre-Treatment Timestamp] value in the table.
I had that alternative expression in as well. I assume either is ok?
No [Pre-Treatment Timestamp] is not the key value.
Ok, sure. Just the way you said it before made me think it wasnโt just a straight-forward MAX(). Are you wanting it to only be the max in the current slice?
Yah they do the exact same thing.
Ok, then โ[Max Pre-Treatment Timestamp].[AM/PM Charge]โ is not going to work. This is a dereference expression, the column before the period needs to be a Ref-type column, which you shouldnโt have if this column was built off of the [Pre-Treatment Timestamp] value.
There are multiple ways to get this value. Iโm not currently coming to a conclusion as to which is best, but this should work.
LOOKUP(
MAX( Operations_Master_Check[Pre-Treatment Timestamp] ),
โOperations_Master_Checkโ,
โPre-Treatment Timestampโ,
โAM/PM Chargeโ
)
Thanks a million @Marc_Dillon.
I will test your suggestion.
User | Count |
---|---|
43 | |
26 | |
23 | |
14 | |
11 |