Don't change the DayNames variable in the script. This will just change the names. so if you use
you will get 'Wed' instead of the correct value 'Sat'.
If you are using a master calendar, I would suggest creating a custom week number for your specific week start and end. Then you can easily group your dates and aggregates by this week number and also filter to e.g. the previous week.
If you post some data, e.g. as INLINE table or excel file, I think someone around can create a solution pretty fast.
You can also have a look at
Thanks for response, as you can see i have attached a screenshot of the data, in that i want to see only data from Friday to Thursday i.e 22nd to 28th as a last week.
As per your suggested links, i created a variable with the weekstart.
Could you please provide me the expression of set analysis to show only data for last week (from 22nd to 28th) (weekstart from Friday and ends on Thursday)