ORDERBY by date - question

Aurelien
Google Developer Expert
Google Developer Expert

Hi Community,

I had a look to many posts and documentation but I don’t get why my expression does not gives the expected result.

I have a list of ID related to a table of prices, which contains [DATE] column (type Date) and I want to sort this ID list by their date.
The final purpose is to get the most recent price.

To achieve that, I use a FILTER expression so that I’m sure I will get a list of key-columns values, and use ORDERBY expression to sort this list according to the date.
The next step will be to use TOP() Expression.

Here is the “basic” expression: defaultPrice_TEST_per1

FILTER(
	"PRIX VENTE",
     AND(
		[Devise]="€",   
          [Qté Lot]="1", 
     	[ID REF]=[_THISROW].[related_ID_Object]
          
     )
)

Here is the “sorted” expression: defaultPrice_TEST_per1_orderedByDate_TRUE

ORDERBY(
  FILTER(
       "PRIX VENTE",
       AND(
            [Devise]="€",   
            [Qté Lot]="1", 
            [ID REF]=[_THISROW].[related_ID_Object]

       )
  ),
  [DATE],
  TRUE
)

And the output I got, which does not make sense to me:
3X_6_c_6c51bbc816f04990d3768129129b4bab3d49e2ff.png

Because of this, I didn’t try the TOP() yet because I need my previous expression to give the expected result.

Any clue on how to achieve what I want ?
Or, the list is sorted but this is just a matter of preview display ?

Many thanks in advance

Solved Solved
0 12 662
1 ACCEPTED SOLUTION

The order of the list and order on the inline view are two different things. You can sort the order from the inline view or if you don’t have it, you can create a table view where the position is set as Ref.

View solution in original post

12 REPLIES 12
Top Labels in this Space