Hi Friends,
I am using a calculated field to generate data for weeks. The weeks are created based on the selected end Date.
e.g if a user selects date 2024-06-28 the two weeks get created are as follows-
2024-06-29 to 2024-07-05, 2024-06-22 to 2024-06-28, 2024-06-15 to 2024-06-21
but I want only previous last two weeks to be generated only, not the whole series of weeks. I tried to use filters and choose last 2 weeks data as relative week filter but that works only for current weeks date, if I go back to older dates, it does not show data.
how can I restrict the data to be only two weeks always whatever date is selected.
e.g if I select 28-June i get the data for week 22-28 June and Previous week which is 15-21 June.
similarly when I choose 14 june as select date, the week should be 8-14 june and 1-7 june
my calculated field is here- which generates the start of the week
addDateTime(extract(‘WD’, ${SelectEndDate}), ‘DD’, truncDate(‘WK’, {line_item_usage_date}))
working ok-
not working- I would expect it to show 1-7 june and 8-14 june