Test is showing a different expression compared to the editor

There was a post about a similar problem back in April 2020, but my issue is a little different.

I have the following expression in the editor:

I thought this would give me a list of the Top 5 [TotalWeight] based a specific TripID referenced. The expression editor gives the green light.

When I go to test, I get the following result:

It is giving me a list of weights, but from [_THISROW-1].[TripID] and not from [_THISROW].[TripID] as in the expression editor. The weights are from the previous trip and not the current trip.

Am I doing something wrong? Is this a bug?


Hmmm… :thinking: You might be running into an issue due to duplicate column names.

Sometimes it can confuse the system when you have:

  • TableA[TripID]; and
  • TableB[TripID]

Instead, try changing one of the columns names so that it’s unique; I imagine that one of the TripIDs is a selection you’re making, like a dropdown or something?