<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Generate schedule to identify scheduled shift in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3382709#M127462</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="600138" data-lia-user-login="nlynch1982" class="lia-mention lia-mention-user"&gt;nlynch1982&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;Have been a bit busy and looking at this properly now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just wanted to check a minor point in the file you shared. There seems to be a slight error - possibly just a copy/paste error.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;There seems to be an extra row of shifts inserted on 28-Jan, which has pushed subsequent shifts down one row.&lt;/LI&gt;
&lt;LI&gt;Saturdays should just have a Day shift shouldn't they?&lt;/LI&gt;
&lt;LI&gt;On Sat 28-Jan-2023 there should be just Day2 right?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Putting that to one side, in order to help define the table, we could first define "week types" as follows:&lt;/P&gt;
&lt;TABLE border="1" width="97.94437726723096%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Week Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Wed-Fri&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Sat-Tue&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1-2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Day1/Night1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Day2/Night2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1-1&lt;/TD&gt;
&lt;TD&gt;Day1/Night1&lt;/TD&gt;
&lt;TD&gt;Day1/Night1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2-1&lt;/TD&gt;
&lt;TD&gt;Day2/Night2&lt;/TD&gt;
&lt;TD&gt;Day1/Night1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the schedule can be summarised as:&lt;/P&gt;
&lt;TABLE width="285"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;&lt;STRONG&gt;Rotation&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;&lt;STRONG&gt;Week #&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;&lt;STRONG&gt;Week Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;3&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;4&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;5&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;6&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;3&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;4&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;5&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;6&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the above table look correct? I will get to the DAX shortly!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2023 12:04:10 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2023-08-16T12:04:10Z</dc:date>
    <item>
      <title>Generate schedule to identify scheduled shift</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3370214#M126810</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, I am struggling to create a DAX formula to generate a calendar (date table) with three-day rotation that flips workdays every 6 weeks to be used to identify which team(s) are scheduled to be working any given day.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example: Rotation B has Day1 and Night1 shifts working Wed-Fri for 6 weeks with Day2 working Sat, Mon &amp;amp; Tues and Night2 working Sun-Tues. After 6 weeks, the Day1 shift will also work Sat, Mon &amp;amp; Tues with Night1 also working Sun-Tues with Day2 and Night2 teams returning Wednesday completing the transition to Rotation A. Rotation A will run for 6 weeks before switching back t Rotation B.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This needs to calculate perpetually, starting 11/30/2022 and I am at a loss.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any assistance!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 12:05:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3370214#M126810</guid>
      <dc:creator>nlynch1982</dc:creator>
      <dc:date>2023-08-08T12:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Generate schedule to identify scheduled shift</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3377697#M127201</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="600138" data-lia-user-login="nlynch1982" class="lia-mention lia-mention-user"&gt;nlynch1982&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should be possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Just to clarify, could you post a calendar showing a complete cycle of Rotation A &amp;amp; Rotation B (which I assume is 12 weeks in total)?&amp;nbsp;If you could share an Excel file by OneDrive or Google Drive that would be great.&lt;/LI&gt;
&lt;LI&gt;I take it that Rotation A always looks the same, as does Rotation B?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, do you prefer to create this table in DAX or would you be open to Power Query as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 13 Aug 2023 08:48:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3377697#M127201</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-08-13T08:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generate schedule to identify scheduled shift</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3378895#M127278</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;A href="https://docs.google.com/spreadsheets/d/1RfoBaf9BYqXakS_HrCULH51SOnfviK6S/edit?usp=drivesdk&amp;amp;ouid=101416938281260460302&amp;amp;rtpof=true&amp;amp;sd=true" target="_blank" rel="noopener"&gt;Here&lt;/A&gt;&amp;nbsp;is the link to excel file in Google Drive - yes, a full rotation is 12 weeks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For this specific case, DAX is preferred - but knowing how to do this in Power Query would be very helpful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 11:09:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3378895#M127278</guid>
      <dc:creator>nlynch1982</dc:creator>
      <dc:date>2023-08-14T11:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generate schedule to identify scheduled shift</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3382709#M127462</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="600138" data-lia-user-login="nlynch1982" class="lia-mention lia-mention-user"&gt;nlynch1982&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;Have been a bit busy and looking at this properly now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just wanted to check a minor point in the file you shared. There seems to be a slight error - possibly just a copy/paste error.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;There seems to be an extra row of shifts inserted on 28-Jan, which has pushed subsequent shifts down one row.&lt;/LI&gt;
&lt;LI&gt;Saturdays should just have a Day shift shouldn't they?&lt;/LI&gt;
&lt;LI&gt;On Sat 28-Jan-2023 there should be just Day2 right?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Putting that to one side, in order to help define the table, we could first define "week types" as follows:&lt;/P&gt;
&lt;TABLE border="1" width="97.94437726723096%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Week Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Wed-Fri&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Sat-Tue&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1-2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Day1/Night1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Day2/Night2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1-1&lt;/TD&gt;
&lt;TD&gt;Day1/Night1&lt;/TD&gt;
&lt;TD&gt;Day1/Night1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2-1&lt;/TD&gt;
&lt;TD&gt;Day2/Night2&lt;/TD&gt;
&lt;TD&gt;Day1/Night1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the schedule can be summarised as:&lt;/P&gt;
&lt;TABLE width="285"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;&lt;STRONG&gt;Rotation&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;&lt;STRONG&gt;Week #&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;&lt;STRONG&gt;Week Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;3&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;4&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;5&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;A&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;6&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2-1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;3&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;4&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;5&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;B&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;6&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1-2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the above table look correct? I will get to the DAX shortly!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:04:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3382709#M127462</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-08-16T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Generate schedule to identify scheduled shift</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3382740#M127464</link>
      <description>&lt;P&gt;Many apologies for the typo, I have corrected the sheet on the drive!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only Day shift will work Saturdays and only night shift will work on Sundays.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For clarity sake, I wanted to add a row 2-2 which has Day2 and Night2 for Wed-Fri and Sat-Tue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1-1 and 2-2 are 'Transition Weeks' where 1-2 and 2-1 would be considered the 'typical schedule' for the rotation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again, very much&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 12:36:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3382740#M127464</guid>
      <dc:creator>nlynch1982</dc:creator>
      <dc:date>2023-08-16T12:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Generate schedule to identify scheduled shift</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3386363#M127601</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="600138" data-lia-user-login="nlynch1982" class="lia-mention lia-mention-user"&gt;nlynch1982&lt;/a&gt;&amp;nbsp;no problem!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've come up with DAX code for a calculated table which I believe does what you want.&lt;/P&gt;
&lt;P&gt;I've tried to parameterise things so that you can adjust as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The basic method used is to&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Set up some parameters (scalars and&amp;nbsp; tables) up-front&lt;/LI&gt;
&lt;LI&gt;Create a calendar without the shift information (CalendarExtended)&lt;/LI&gt;
&lt;LI&gt;Add the shift information using joins&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calendar =
-- ===========================================================
-- SECTION A: Parameters
-- ===========================================================

-- ----------------------------------------------------------
-- A1. MISCELLANEOUS PARAMETERS
-- ----------------------------------------------------------

-- Calendar bounds
VAR MinDate = dt"2022-11-23"
VAR MaxDate = dt"2023-02-28"

-- Number of weeks per full rotation
-- This must be equal to the number of rows of WeekTypes below
VAR NumWeeksFullRotation = 12

-- Days per week (should always be 7)
VAR DaysPerWeek = 7

-- Prefixes used for the Day/Night shifts when displayed in the final table
VAR DayPrefix = "Day"
VAR NightPrefix = "Night"

-- Weekday return types
-- Type 13 gives Wed = 1 to Tue = 7
-- Type 16 gives Sat = 1 to Fri = 7
VAR WeekdayType = 13
VAR WeekdayTypePresentation = 16

-- Reference date should be a date in the first week of Rotation A
VAR ReferenceDate = dt"2022-11-30"

-- ----------------------------------------------------------
-- A2. PARAMETER: Weektypes
-- ----------------------------------------------------------
-- WeekTypes gives each of the 12 weeks a zero-based index WeekIndex
-- and specifies the Rotation (A or B)
-- and the shift numbers in Block 1 &amp;amp; Block 2 of the week.
-- For example:
--   The row {  1, "A", 2, 1 }
--   means
--     Week 1 is Rotation A,
--     and assigns Day/Night Shift 2 to the 1st Block of the week
--     and assigns  Day/Night Shift 1 to the 2nd Block of the week.
--   In other words, Week 1 is a 2-1 week in Block A.
VAR WeekTypes =
    DATATABLE (
        "WeekIndex", INTEGER,
        "Rotation", STRING,
        "Block1", INTEGER,
        "Block2", INTEGER,
        {
            { 0, "A", 1, 1 },
            { 1, "A", 2, 1 },
            { 2, "A", 2, 1 },
            { 3, "A", 2, 1 },
            { 4, "A", 2, 1 },
            { 5, "A", 2, 1 },
            { 6, "B", 1, 2 },
            { 7, "B", 1, 2 },
            { 8, "B", 1, 2 },
            { 9, "B", 1, 2 },
            { 10, "B", 1, 2 },
            { 11, "B", 1, 2 }
        }
    )

-- ----------------------------------------------------------
-- A3. PARAMETER: ShiftPattern
-- ----------------------------------------------------------
-- ShiftPattern specifices when the Block 1 &amp;amp; Block 2 shifts appear on weekdays.
-- Note: Weekdays numbered Wed = 1 to Tue = 7
-- Currently, Block 1 shifts appear on Wed-Fri &amp;amp; Block 2 shifts appear on Sat-Tue.
-- Blanks indicate no shift is working in that slot.
-- For example:
--   The row { 1, 1, 1 }
--   means on Weekday 1 (Wed)
--   Day shift is the shift assigned to Block 1
--   Night shift is the shift assigned to Block 1
VAR ShiftPattern =
    DATATABLE (
        "Weekday", INTEGER,
        "Day", INTEGER,
        "Night", INTEGER,
        {
            { 1, 1, 1 },
            { 2, 1, 1 },
            { 3, 1, 1 },
            { 4, 2, BLANK () },
            { 5, BLANK (), 2 },
            { 6, 2, 2 },
            { 7, 2, 2 }
        }
    )

-- ===========================================================
-- SECTION B: CALCULATIONS
-- ===========================================================

-- Number of days per full rotation (A &amp;amp; B).Currently 12 * 7 = 84
VAR NumDaysFullRotation = NumWeeksFullRotation * DaysPerWeek

-- Reference date adjusted to Wednesday to ensure it is the start of a week
-- If  different WeekdayType is used, it is assumed to be numbered 1-7
VAR ReferenceDateAdj =
    ReferenceDate - WEEKDAY ( ReferenceDate, WeekdayType ) + 1
VAR CalendarBase =
    CALENDAR ( MinDate, MaxDate )
VAR CalendarExtended =
    GENERATE (
        CalendarBase,
        VAR d = [Date]
        VAR CurrentWeekStart =
            d - WEEKDAY ( d, WeekdayType ) + 1
        VAR WeekIndex =
            QUOTIENT ( MOD ( d - ReferenceDateAdj, NumDaysFullRotation ), DaysPerWeek )
        VAR WeekDay =
            WEEKDAY ( d, WeekdayType )
        VAR WeekDayPresentation =
            WEEKDAY ( d, WeekDayTypePresentation )
        RETURN
            ROW (
                "WeekIndex", WeekIndex,
                "Weekday", WeekDay,
                "Weekday Presentation", WeekdayPresentation
            )
    )
VAR CalendarJoinWeekTypes =
    NATURALLEFTOUTERJOIN ( CalendarExtended, WeekTypes )
VAR CalendarJoinShiftPattern =
    NATURALLEFTOUTERJOIN ( CalendarJoinWeekTypes, ShiftPattern )
VAR CalendarFinal =
    SELECTCOLUMNS (
        CalendarJoinShiftPattern,
        "Date", [Date],
        "Weekday", [Weekday Presentation],
        "Rotation", [Rotation],
        "Day",
            IF (
                NOT ISBLANK ( [Day] ),
                DayPrefix &amp;amp; SWITCH ( [Day], 1, [Block1], 2, [Block2] )
            ),
        "Night",
            IF (
                NOT ISBLANK ( [Night] ),
                NightPrefix &amp;amp; SWITCH ( [Night], 1, [Block1], 2, [Block2] )
            )
    )
RETURN
    CalendarFinal&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post back if needed. Can also get back to you on a Power Query method later &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 00:40:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3386363#M127601</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-08-18T00:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Generate schedule to identify scheduled shift</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3387290#M127653</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you so much!! This is exactly what I need! Very, very much appreciative for you!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 11:55:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Generate-schedule-to-identify-scheduled-shift/m-p/3387290#M127653</guid>
      <dc:creator>nlynch1982</dc:creator>
      <dc:date>2023-08-18T11:55:39Z</dc:date>
    </item>
  </channel>
</rss>

