<?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: working days in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/working-days/m-p/2570564#M73403</link>
    <description>&lt;P&gt;Thank you very much for the answer!&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 04:35:34 GMT</pubDate>
    <dc:creator>MTrullàs</dc:creator>
    <dc:date>2022-06-10T04:35:34Z</dc:date>
    <item>
      <title>working days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/working-days/m-p/2568045#M73231</link>
      <description>&lt;P&gt; Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a problem with this metric. I need to count the working days between the two dates. In some moments, the metric works perfectly, but in other situations, it does not work like in the example.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Anybody know why?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you for your comments.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 05:44:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/working-days/m-p/2568045#M73231</guid>
      <dc:creator>MTrullàs</dc:creator>
      <dc:date>2022-06-09T05:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: working days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/working-days/m-p/2568443#M73254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399197" data-lia-user-login="MTrullàs" class="lia-mention lia-mention-user"&gt;MTrullàs&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;It is difficult to verify how columns are evaluated&amp;nbsp;within the filter context without having the data in front of your eyes. However, I would follow a totally different approach. I would create my own calendar table. The only thing is that I don't know what are you expecting to see if either of the start/end dates is blank? I just return zero.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Transporte Campa =
VAR StartDay =
    MAX ( HIFA[Ch35 (WERK-AUS) Ist] )
VAR EndDay =
    MAX ( HIFA[Ch38 (DEP-EIN) Ist] )
RETURN
    IF (
        ISBLANK ( StartDay ) || ISBLANK ( EndDay ),
        0,
        VAR DatesTable =
            CALENDAR ( StartDay, EndDay - 1 )
        VAR DatesAndWeekDays =
            ADDCOLUMNS ( DatesTable, "@WeekDay", WEEKDAY ( [Date], 2 ) )
        VAR WorkDaysTable =
            FILTER ( DatesAndWeekDays, NOT ( [@WeekDay] IN { 6, 7 } ) )
        RETURN
            COUNTROWS ( WorkDaysTable )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Jun 2022 08:20:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/working-days/m-p/2568443#M73254</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-09T08:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: working days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/working-days/m-p/2570564#M73403</link>
      <description>&lt;P&gt;Thank you very much for the answer!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 04:35:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/working-days/m-p/2570564#M73403</guid>
      <dc:creator>MTrullàs</dc:creator>
      <dc:date>2022-06-10T04:35:34Z</dc:date>
    </item>
  </channel>
</rss>

