Search code examples
powerbidax

How to start week in Power BI from Friday


I need to create a biweekly interval where Friday is first day of the week. I am stuck at trying to figure out if there's a function that will allow moving first day of the week to Friday.

I have tried the WEEKDAY() function, but it only allows start dates between Saturday, Sunday, Monday.


Solution

  • You could create a DAX Calculated Column with this:

    Week Starting (fri) = 
      var wkd = WEEKDAY([Date], 2)
      return [Date] + IF(wkd > 4, 5, -2) - wkd
    

    This will return the previous Friday date.