I created a date table using the Calendar dax function (instead of the date code provided by Sam for power query) as I needed one where the mix and max date depended on the date field coming from one of the tables.
I created custom calculated columns for a Start of week column (type date) and a week start column (type text). I need a way to sort these two columns. I created another calculated column to sort it but powerbi won’t let me sort based off this calculated column as it references the column I want to sort. see screenshots.
You were so close to solving it! The problem you have is acually one of cardinality…
I made a few changes to your calendar table because you don’t need the calculated columns:
As you can see I added the short year to [WeekStart2] this solves you cardinality issue and then you are able to sort by [StartOfWeekSort2] without any problems. Finally I marked your calendar table as a Date Table (you can find that on the Modeling ribbon).