<?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: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4262863#M168959</link>
    <description>&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;Sorry to reach out directly, were you able to view my pbix ?&amp;nbsp; Seems to be shared ?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 19:41:46 GMT</pubDate>
    <dc:creator>coochy5</dc:creator>
    <dc:date>2024-10-29T19:41:46Z</dc:date>
    <item>
      <title>Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4251385#M168349</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Already posted a q about this - in the general group, but I think it's died.&lt;/P&gt;&lt;P&gt;I've created a pbix with a matrix view that needs to show vacation days and shift days off.&lt;/P&gt;&lt;P&gt;Multiple shifts involved, various (historical) start dates.&lt;/P&gt;&lt;P&gt;This is what I'm trying to recreate - was built in C#, but is dying:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each worker has a ‘WorkScheduleCalender’ string on their HR record, which I’ve delineated out into a ‘Rotation’ and ‘Crew’ field in a sql view, for slicers.&amp;nbsp; (Not sure that is helping, or hindering me !)&lt;/P&gt;&lt;P&gt;I’ve got as far as creating a version, that operates well on just the vacation days off basis – I really have no idea how to incorporate the shift off days, into the same matrix visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is as far as I have been able to go with just the vacation/day off calendar - not yet able to incorporate shift days off.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Assumptions.&amp;nbsp; Shift rotations don't overlap.&amp;nbsp; Employees don't book vacations during shift off days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample of the shift rotations...&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Work Schedule Calendar&lt;/TD&gt;&lt;TD&gt;Work Week Start Day&lt;/TD&gt;&lt;TD&gt;Biweekly Calculation Start Date&lt;/TD&gt;&lt;TD&gt;Configurable Calculation Period&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate - 10/4 Rotation 2&lt;/TD&gt;&lt;TD&gt;Tuesday&lt;/TD&gt;&lt;TD&gt;2/21/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker / Hourly - 22/13 Rotation 1 (Purple)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;5/2/2018&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker / Hourly - 22/13 Rotation 2 (Orange)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;5/9/2018&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker / Hourly - 22/13 Rotation 3 (Grey)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;5/16/2018&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker / Hourly - 22/13 Rotation 4 (Brown)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;5/23/2018&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker / Hourly - 22/13 Rotation 5 (Teal)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;5/30/2018&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker /Salary - 15/6 Rotation 2 (Red)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2/8/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker/ Salary - 15/6 Rotation 1 (Blue)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2/22/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Bulker/ Salary - 15/6 Rotation 3 (Yellow)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2/15/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day Rate / Salary&amp;nbsp; - 10/4 Rotation 1&lt;/TD&gt;&lt;TD&gt;Tuesday&lt;/TD&gt;&lt;TD&gt;2/14/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Salary - 10/4 Rotation 1&lt;/TD&gt;&lt;TD&gt;Sunday&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Salary - 10/4 Rotation 2&lt;/TD&gt;&lt;TD&gt;Sunday&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Salary - 15/13 Rotation 1 (Magenta)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;4/1/2020&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Salary - 15/13 Rotation 2 (Pink)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;4/15/2020&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Salary - 15/13 Rotation 3&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;4/1/2020&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Salary - 15/13 Rotation 4&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;4/1/2020&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Hourly - 8/6 Rotation 1 (10hr)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2/15/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Hourly - 8/6 Rotation 1 Tu-Mo (10hr)&lt;/TD&gt;&lt;TD&gt;Tuesday&lt;/TD&gt;&lt;TD&gt;2/14/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Hourly - 8/6 Rotation 2 (10hr)&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2/22/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Hourly - 8/6 Rotation 2 Tu-Mo (10hr)&lt;/TD&gt;&lt;TD&gt;Tuesday&lt;/TD&gt;&lt;TD&gt;2/21/2017&lt;/TD&gt;&lt;TD&gt;Month Starting on Day 1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Any assistance or recommendations for an alternate method of replicating this, is greatly appreciated !!!&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample data&lt;/P&gt;&lt;P&gt;(uploading again)&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/c/7e54286728b81af7/EfllLfwmbrtDrt1BDkcmSJcBWt8iP5dvXyvD-RNhTErYkg?e=lFdMbH" target="_self"&gt;https://1drv.ms/u/c/7e54286728b81af7/EfllLfwmbrtDrt1BDkcmSJcBWt8iP5dvXyvD-RNhTErYkg?e=lFdMbH&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 01:28:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4251385#M168349</guid>
      <dc:creator>coochy5</dc:creator>
      <dc:date>2024-10-23T01:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4251798#M168368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="806046" data-lia-user-login="coochy5" class="lia-mention lia-mention-user"&gt;coochy5&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please verify if the following is helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Preparation of the table：&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calendar = 
ADDCOLUMNS(
    CALENDAR(DATE(2024,1,1), DATE(2024,12,31)),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "Day", DAY([Date]),
    "Weekday", WEEKDAY([Date],2)
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Measure:&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ShiftStatus = 
VAR StartDate = MAX('Shift Schedule'[Shift Start Date])  
VAR CurrentDate = MAX('Calendar'[Date])  
VAR WorkDays = MAX('Shift Schedule'[Work Days])  
VAR OffDays = MAX('Shift Schedule'[Off Days])  
VAR TotalDays = WorkDays + OffDays  
VAR DaysPassed = DATEDIFF(StartDate, CurrentDate, DAY)  
VAR CyclePosition = MOD(DaysPassed, TotalDays)  
RETURN 
IF(CyclePosition &amp;lt; WorkDays, "workday" ,"offday")
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;VacationStatus = 
IF(
    MAX('Calendar'[Date]) &amp;gt;= MAX('Vacation'[Vacation Start Date]) &amp;amp;&amp;amp; 
    MAX('Calendar'[Date]) &amp;lt;= MAX('Vacation'[Vacation End Date]),
    "Vacation", 
    BLANK()
)
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;FinalStatus = 
IF(
    NOT(ISBLANK(('Vacation'[VacationStatus]))),
    'Vacation'[VacationStatus],
    'Shift Schedule'[ShiftStatus]
)&lt;/LI-CODE&gt;
&lt;P&gt;Result for your reference:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Joyce&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 03:07:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4251798#M168368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-22T03:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4253016#M168443</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Many thanks for the response.&amp;nbsp; It is very helpful, and gets me much closer to what I'm trying to get - but not quite there.&amp;nbsp; I get it....don't get it !&lt;/P&gt;&lt;P&gt;I tried to use your suggestion - muddled up with my own - and confused myself and the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've uploaded a newer version of the pbix - sample data.&amp;nbsp; I've added all of the shift schedules, and their start dates - I guess I'm mainly confused about the vacation piece - it's a one row per event data set - so not sure if I should set the vacation start and end to be the same.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample set only includes workers on the same rotation, but different crews (colours) - and the crew colour would have a different/offset start day on/off.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1OoPk-sxRww6XIrs2zbSaMUwz8BtZ8Wlz/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1OoPk-sxRww6XIrs2zbSaMUwz8BtZ8Wlz/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any further insight you could provide !&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 19:18:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4253016#M168443</guid>
      <dc:creator>coochy5</dc:creator>
      <dc:date>2024-10-22T19:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4256104#M168602</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="806046" data-lia-user-login="coochy5" class="lia-mention lia-mention-user"&gt;coochy5&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am currently unable to access your PBIX file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try the following method instead?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do not include sensitive information or anything not related to the issue or question.&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;</description>
      <pubDate>Thu, 24 Oct 2024 09:36:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4256104#M168602</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-24T09:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4258328#M168724</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Trying again.&amp;nbsp; Not quite sure why the sharing has been a challenge.&lt;/P&gt;&lt;P&gt;This is my sample pbix - all data has been changed - with a good selection of event dates (all event dates can be treated the same way - vacation/parental etc).&amp;nbsp; I've added a shift schedule table also.&amp;nbsp; From a vacation standpoint - this is working well, but I would like to try and overlay the shift schedule days off.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1OoPk-sxRww6XIrs2zbSaMUwz8BtZ8Wlz/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1OoPk-sxRww6XIrs2zbSaMUwz8BtZ8Wlz/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I am trying to achieve is this - where the yellow indicates the vacation, and the red is the shift schedule time off&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;</description>
      <pubDate>Fri, 25 Oct 2024 16:19:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4258328#M168724</guid>
      <dc:creator>coochy5</dc:creator>
      <dc:date>2024-10-25T16:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4262863#M168959</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;Sorry to reach out directly, were you able to view my pbix ?&amp;nbsp; Seems to be shared ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 19:41:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4262863#M168959</guid>
      <dc:creator>coochy5</dc:creator>
      <dc:date>2024-10-29T19:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4263230#M168978</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="806046" data-lia-user-login="coochy5" class="lia-mention lia-mention-user"&gt;coochy5&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for the file. I will need some time to work on it. I appreciate your patience&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;SPAN data-teams="true"&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 05:10:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4263230#M168978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-30T05:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4268330#M169231</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="806046" data-lia-user-login="coochy5" class="lia-mention lia-mention-user"&gt;coochy5&lt;/a&gt;&amp;nbsp;，&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Please check the following measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IsShiftOffDayMeasure = 
VAR RotationDaysOn = VALUE(LEFT(SELECTEDVALUE('Fact Crew Worker Time Off V1 sample'[Rotation]), FIND("/", SELECTEDVALUE('Fact Crew Worker Time Off V1 sample'[Rotation])) - 1))
VAR RotationDaysOff = VALUE(RIGHT(SELECTEDVALUE('Fact Crew Worker Time Off V1 sample'[Rotation]), LEN(SELECTEDVALUE('Fact Crew Worker Time Off V1 sample'[Rotation])) - FIND("/", SELECTEDVALUE('Fact Crew Worker Time Off V1 sample'[Rotation]))))
VAR StartDate = 
    CALCULATE(
        MIN('Fact Crew Worker Time Off V1 sample'[Date]), 
        ALLEXCEPT('Fact Crew Worker Time Off V1 sample', 'Fact Crew Worker Time Off V1 sample'[Crew], 'Fact Crew Worker Time Off V1 sample'[Name])  
    )
VAR DaysSinceStart = DATEDIFF(StartDate, SELECTEDVALUE('Calendar'[Date]), DAY)
VAR CycleDays = RotationDaysOn + RotationDaysOff
RETURN
IF(
    MOD(DaysSinceStart, CycleDays) &amp;gt;= RotationDaysOn,
    1,  // offday
    0   // workday
)
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Colour Format = 
IF([Value_per_day] = "V", "#fed70d",
IF([Value_per_day] = "U", "#fed68d",
IF([IsShiftOffDayMeasure] = 1, "#FFB6C1"
)))&lt;/LI-CODE&gt;
&lt;P&gt;Result for your reference:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Joyce&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 02:09:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4268330#M169231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-04T02:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dax assistance needed - shift/rotation calendar needed in conjunction with a vacation calender.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4269739#M169314</link>
      <description>&lt;P&gt;Joyce,&lt;/P&gt;&lt;P&gt;Many thanks for your assistance again !&lt;/P&gt;&lt;P&gt;Almost there - I think somehow you had an older file - I had added a shift days off table in the sample data I see - I don't think it's in referenced in the measure - I see rotation mentioned, but it's crew colout that needs to be the driver of the shift days off calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example - in your example you sent back - both Edgar and Sean are on the same rotation (15/6) and on the same crew (colour) - yellow - so the shift days off would be the same for all of the yellow crew (who only have a 15/6 rotation).&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;Any further thoughts ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The shift table - in my sample data is named 'Shift schedule'.&amp;nbsp; I could try and upload another copy, but that seems to not work correctly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is it's format...if that helps ?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your assistance with this !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 22:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-assistance-needed-shift-rotation-calendar-needed-in/m-p/4269739#M169314</guid>
      <dc:creator>coochy5</dc:creator>
      <dc:date>2024-11-04T22:21:08Z</dc:date>
    </item>
  </channel>
</rss>

