<?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: Workday count between two dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424684#M64360</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATESBETWEEN Removes the filter from the date table. It sepends on your columns but tou may&lt;SPAN&gt;&amp;nbsp;try&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Sum of working days =
SUMX (
    'Medewerkers',
    CALCULATE (
        SUM ( Kalender[Werkdag] ),
        DATESBETWEEN (
            'Kalender'[Date],
            'Medewerkers'[Datum_in_dienst_dienstjr],
            'Medewerkers'[Einddatum_contract]
        ),
        VALUES ( Kalender[month] )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 15:22:16 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-03-29T15:22:16Z</dc:date>
    <item>
      <title>Workday count between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424579#M64353</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me filter my measure by month?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an employee-table with start and end-dates and a date table with a workday column where each workday is 1 and all non-workdays are zero. I'm trying to create a measure which counts the total amount of workdays within the filter context. I think I got this to work with this expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum of working days = SUMX(
    'Medewerkers', 
    CALCULATE(
        SUM(Kalender[Werkdag]),
        DATESBETWEEN(
            'Kalender'[Date],
            'Medewerkers'[Datum_in_dienst_dienstjr],
            'Medewerkers'[Einddatum_contract]))
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I sum the workday column with a datesbetween-filter with the end and start date, whitin a sumx for the employee-table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this measure I can see the total amount of working days on indvidual levels and/or department totals etc. However, when trying to get the amount of working days per month, for a specific person, per month I'm getting this result:&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;Is there a way to overcome this? A filter I can apply or relationship I have to make? There is currently no relationship between the date table and the employee table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't seem to make sense of it and all the examples I found online use calculated columns, which I think doesn't work since it should be dynamic; the amount of working days have to be able to be sliced by date.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 14:40:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424579#M64353</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-29T14:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Workday count between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424684#M64360</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATESBETWEEN Removes the filter from the date table. It sepends on your columns but tou may&lt;SPAN&gt;&amp;nbsp;try&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Sum of working days =
SUMX (
    'Medewerkers',
    CALCULATE (
        SUM ( Kalender[Werkdag] ),
        DATESBETWEEN (
            'Kalender'[Date],
            'Medewerkers'[Datum_in_dienst_dienstjr],
            'Medewerkers'[Einddatum_contract]
        ),
        VALUES ( Kalender[month] )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 15:22:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424684#M64360</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-29T15:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Workday count between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424760#M64370</link>
      <description>&lt;P&gt;Thanks, that seems to solve it!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you maybe explain why/how this works as a filter? I'm pretty new to DAX and like to learn more about how it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks anyhow!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 15:51:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424760#M64370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-29T15:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Workday count between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424798#M64373</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Filters are actually tables. VALUES is also a table therefore, it restores back the Month column in the filter contaxt.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 16:05:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Workday-count-between-two-dates/m-p/2424798#M64373</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-29T16:05:09Z</dc:date>
    </item>
  </channel>
</rss>

