Date Range (Help)

Hi all,

I need your help because I tried everything โ€ฆ and I spent hours there.

I need to sort the data according to a date period.

I have a DATA sheet, a FILTER sheet with 2 columns โ€œDate Startโ€ and โ€œDate Endโ€.

In Filter sheet I created a virtual column and I tried to put:

SELECT (DATA [_ROWNUMBER], [Date]> [_THISROW]. [Date Start], [Date] <[_THISROW]. [Date End]

THEN

SELECT (DATA [_ROWNUMBER], [Date]> (FILTER [Date Start], Date] <(FILTER [Date End]

The first only takes into account the โ€œDATE STARTโ€ BUT DO NOT TAKE INTO ACCOUNT THE โ€œDATE ENDโ€.

Thank you for helping me. I really canโ€™t do it.

thank you so much

0 6 591
6 REPLIES 6

Steve
Platinum 4
Platinum 4

If the intent is to sort the data for display in a view (e.g., a table view), the view itself should be configured with your sorting preferences:

Thank you but I really wish to have the exact formula, I am obliged to have a Filter with a start date and an end date to search for precise information

Thanks you again

If:

Change to:

SELECT(DATA[_ROWNUMBER], AND([Date]> [_THISROW].[Date Start], [Date]<[_THISROW].[Date End]))

The formula is valid BUT the result is that the first date is taken into account in the sorting (Date Start) BUT the second (Date End) is not taken into account โ€ฆ
Watch an example from my screenshot.

I put in Date End 12/31/2022 but look I have a result in 2023 โ€ฆSomeone else ?


Thanks again

Rรฉmi.

Hmmm, how about:

FILTER("DATA", AND([Date]> [_THISROW].[Date Start], [Date]<[_THISROW].[Date End]))

thanks it works! I was wrong, I had not seen the โ€œANDโ€ in the formula.

the right formula is therefore:

SELECT (DATA [_ROWNUMBER], AND ([Date]> [THISROW]. [Date Start], [Date] <[ THISROW]. [Date End]))

Thanks to Heru you are my hero, and everyone who participated, I hope it will help other beginners like me.

Thanks to the community โ€ฆ

Top Labels in this Space