<?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: Calculate the due date based on start date + working days in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3231192#M118568</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="558959" data-lia-user-login="EricBI90" class="lia-mention lia-mention-user"&gt;EricBI90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apparently this a week relationship. The tables are from different sources. One is direct import and the other is direct query. Let me try to think of other way to do it.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2023 15:20:23 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-05-11T15:20:23Z</dc:date>
    <item>
      <title>Calculate the due date based on start date + working days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3230468#M118517</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello Community!,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am relative new to Power BI and &lt;SPAN&gt;I'm trying to &lt;/SPAN&gt;create&lt;SPAN&gt; something in my power bi report, but I can't seem to get it&lt;/SPAN&gt; work&lt;SPAN&gt;. I hope someone can help me with this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The goal is to calculate the ‘DueDate’ by calculating ‘Arrived_Date_Time’ (the startdate) + ‘DAYSTOSTOCK’ (these days are workdays!).&lt;BR /&gt;&lt;BR /&gt;In my screenshot attached,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the colums ‘Arrived_Date_Time’ and ‘DAYSTOSTOCK’ are from ‘Table A’,&lt;/LI&gt;&lt;LI&gt;the columns ‘&lt;SPAN&gt;'Next&lt;/SPAN&gt;wo&lt;SPAN&gt;rkday1BE, 'Next&lt;/SPAN&gt;wo&lt;SPAN&gt;rkday2BE, 'Next&lt;/SPAN&gt;wo&lt;SPAN&gt;rkday3BE'&lt;/SPAN&gt; are from ‘Table B’ (this is a calendar table).&lt;/LI&gt;&lt;LI&gt;Tables A and B have a relation based on unique key ‘Date’.&lt;/LI&gt;&lt;LI&gt;Data connections are all ‘Direct Queries’ because it has to be a 'real-time' report.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So what I want to achieve is a new single column with the calculated due date.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;On &lt;SPAN&gt;05/01/2023 stock arrived. It should be processed within 3 business days, so the due date should be 10/01/2023&lt;/SPAN&gt; (&lt;SPAN&gt;'Nextworkday3BE'&lt;/SPAN&gt;)&lt;SPAN&gt;.&lt;BR /&gt;Already tried with an IF and a SWITCH (a.workday = 1, then b.Nextworkday1BE, a.workday = 2, then b.Nextworkday2BE, a.workday = 3 then b.Nextworkday3BE) but can't get it to work.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can anyone advise me in this / have any tips?&lt;BR /&gt;&lt;STRONG&gt;Much appreciated!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 09:49:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3230468#M118517</guid>
      <dc:creator>EricBI90</dc:creator>
      <dc:date>2023-05-11T09:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the due date based on start date + working days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3230858#M118539</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="558959" data-lia-user-login="EricBI90" class="lia-mention lia-mention-user"&gt;EricBI90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;DueDate =&lt;BR /&gt;MAXX (&lt;BR /&gt;TableA,&lt;BR /&gt;SWITCH (&lt;BR /&gt;TableA[DAYSTOSTOCK],&lt;BR /&gt;1, RELATED ( TableB[Nextworkday1BE] ),&lt;BR /&gt;2, RELATED ( TableB[Nextworkday2BE] ),&lt;BR /&gt;3, RELATED ( TableB[Nextworkday3BE] )&lt;BR /&gt;) + TableA[Arrived_Date_Time]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 13:00:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3230858#M118539</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-11T13:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the due date based on start date + working days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3231037#M118561</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for your suggestion! Your DAX seems to be OK but I get the following error message:&lt;BR /&gt;"The column 'DML DimDate[NextWorkday1BE]' either doesn't exist or doesn't have a relationship to any table available in the current context."&lt;BR /&gt;&lt;BR /&gt;As you can see in the screenshots below, their is an relationship between the tables. And both fields are 'Date' types.&lt;BR /&gt;Any ideas?&amp;nbsp;&lt;BR /&gt;(fyi,&lt;BR /&gt;table 'A' = VW_SLA_CALCULATIES, from database A&lt;BR /&gt;table 'B' = DimDate, from database B. Can it have something to do with that the tables are from two different sources?)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 14:57:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3231037#M118561</guid>
      <dc:creator>EricBI90</dc:creator>
      <dc:date>2023-05-11T14:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the due date based on start date + working days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3231192#M118568</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="558959" data-lia-user-login="EricBI90" class="lia-mention lia-mention-user"&gt;EricBI90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apparently this a week relationship. The tables are from different sources. One is direct import and the other is direct query. Let me try to think of other way to do it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 15:20:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-due-date-based-on-start-date-working-days/m-p/3231192#M118568</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-11T15:20:23Z</dc:date>
    </item>
  </channel>
</rss>

