Forum Discussion

AlexDantin's avatar
AlexDantin
Icon for Helper I rankHelper I
10 years ago

Generate MaxDate within a group

I have a table full of test instances. Each test is performed against multiple models by multiple individuals, sometimes multiple times within the same day.

 

I want to retrieve the results for each unique User/Model/Test within a calendar week only for the very last occurence within that week

 

On my table I have a numeric datekey, which includes the time. I have also including grouping columns for Year+Week (based on the date time stamp) and an item key combo of User/Model/Test

 

I am getting a "expression refers to multiple columns...cannot be converted to a scalar value" error with the following formula:

 

Column = GROUPBY(table,table[Uniquename],table[WeekGroup],"MaxDate",MAXX(CURRENTGROUP(),table[datekey]))

 

Not sure if I need an additional table of unique values or if I'm missing something else

No RepliesBe the first to reply