Filtering rows in a slice and then sorting them

Hi guys,

I have been successful in slicing my data to produce a list of installation dates that are planned ahead and closer than 10 days in the future:

and(
[Planned Date] >= TODAY(),
[Planned Date] < (TODAY() + 10)
)

 

But now I would like to sort this result by the date column and the following doesn't work:

ORDERBY(
and(
[Planned Date] >= TODAY(),
[Planned Date] < (TODAY() + 10)
),
[Planned Date],
TRUE)

I need the list to show the results from earliest to latest date.

Any help would be appreciated. Thanks!

0 6 269
6 REPLIES 6

Assuming you wish to show the results of your slice into a summary view such as a slice view, you could sort that summary view based on slice by date column in view settings.

Suvrutt_Gurjar_0-1643791418646.png

 

Also you may wish to note that ORDERBY() works only on key columns. It sounds you are using it on non key columns.

https://help.appsheet.com/en/articles/2357312-orderby

Thanks Suvrutt.

I am using the resulting slice data to populate a weekly report. So I need the data sorted by date from the template and resulting email. I use the slice data to populate the email but it shows all the dates mixed.

Is this possible to do?

In general, yes, it should be possible. If you share your template expressions, we could help.

 

Thanks!

Herewith the template that uses the slice above called "Planned Date is between today and 10 days from now":

 

<<Start: Select(Planned Date is between today and 10 days from now[uniqueid], TRUE)>> 

<<[Customer Name]>>

Address: <<[Address]>>

Zone/District: <<[Zone/District]>>

Planned Date: <<[Planned Date]>>

<<End>> 

 

Hi Suvrutt, 

Can we sort when creating slice ? I tried, but it showed below error. 

I want to sort so that it can show the title in Calendar view in an order. 

kvngo94_0-1709452760748.png

kvngo94_1-1709452809041.png

 

What I want is below order of title : 

kvngo94_2-1709452835522.png

 

 

 

<<START>> expressions always need to be having row keys. So assuming your START expression also has row keys, the START expression could be something like 

<<START: ORDRBY(SELECT(Table Name[Table Key], Your date based argument on Select),[Date Column], TRUE )>>

Address: <<[Address]>>

Zone/District: <<[Zone/District]>>

Planned Date: <<[Planned Date]>>

<<End>> 

In the last TRUE argument to sort by dates descending. Please replace with FALSE to sort dates by ascending.

 

Top Labels in this Space