Skip to main content
Hi all! I would like to set a sheet filter, always for the last 12 months.
Something like:
"FILTER "VBAP"."TS_ERDAT" || CALENDAR_MONTH(TODAY) -12"
Could anyone give support on it?
Many thanks in advance!
Regards
Simon

Hi Simon,

 

try it like this:

FILTER "VBAP"."TS_ERDAT" BETWEEN ROUND_MONTH(ADD_MONTHS(ROUND_MONTH(TODAY()),-12)) AND ADD_SECONDS(ROUND_MONTH(TODAY()),-1)

 

Depending on your requirements you may need to adjust the logic.

e.g today we have the 13.03.2024.

The logic above would filter the data between:

 

01.03.2023 00:00:00 - 29.02.2024 23:59:59

 


Hi Dennis,

many thanks for this great support, it works!👍

 

Best Regards

Simon


Reply