Grouping Chart data by YTD, last week etc

Hi. Do anyone know how I can group chart data so its only showing “current year”, “last week”, YTD etc?

I only fint functions for showing +/- ( a number of) days/months from current date.

Last week is just Current date time:rounded down to week+weeks(-1) → Current date time:rounded down to week

Year to date is Current date time:rounded down to year → Current date time

Thanks!! It looks like the week start on Sundays. Do you know how I can change this to Monday?

There might be an option to start week on Sunday in the :rounded down to but I can’t remember. If not, just +days(1)…

Thank you! This is so helpful.
Another thing, do you know how I can change the stop date to always show the last day of the month or the last day of the week. So that the chart remains static with, for example, Monday - Sunday even though we have only reached Thursday in the current week?

It’s all just operations around Current date time. Today is thursday, so Monday a few days ago is (assuming week rounds to Sunday):

Current date time:rounded down to week+days (1) → Current date:time:rounded down to week +days(1)+weeks(1) (or just +days(8))

EDIT: and check ‘don’t skip empty groups’ so that it will still display the data even if nothing is found (i.e it is in the future)

1 Like