Measure to calculate previous week of selected week. No selection=previous week of current week
I need some help regarding a measure to calculate the net sales of previous week when a week in slicer 'Week' is selected e.g. when Week 46 is selected in the slicer, I want the net sales of Week 45 (It also needs to take into account when Week 1 is selected, I would need the net sales of Week 52 of previous year). When there is no selection in slicer 'Week', it needs to show the net sales of previous week of the current week. When multiple weeks are selected in the slicer, it needs to show the previous week of the earliest week. For example when weeks 3 and 4 are selected, it needs to show the net sales of week 2.
I have created this measure for previous month of the selected month, but I can't seem to figure it out for previous week. Any help is welcome 🙂