Skip to main content
Question

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!RegardsSimon

  • March 13, 2024
  • 2 replies
  • 20 views

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

2 replies

dennis.pflug
Level 10

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

 


  • Author
  • Level 1
  • March 13, 2024

Hi Dennis,

many thanks for this great support, it works!👍

 

Best Regards

Simon