<?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: Networkingdays per Employee based on their respective Working Model in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369058#M173451</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391312" data-lia-user-login="JKross" class="lia-mention lia-mention-user"&gt;JKross&lt;/a&gt;&amp;nbsp;First ensure that the relationships between the tables are correctly set up in the Power BI model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a calculated column in the Calendar table to identify if a day is a working day for each working model.&lt;/P&gt;
&lt;P&gt;WorkingDay = &lt;BR /&gt;VAR CurrentDay = 'Calendar'[Weekday]&lt;BR /&gt;VAR WorkingDaysString = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX('Working Model'[Workingdays]),&lt;BR /&gt;RELATED('Employees'[WorkingModelID]) = 'Working Model'[WorkingModelID]&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;CONTAINSSTRING(WorkingDaysString, FORMAT(CurrentDay, "0")),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure to count the working days excluding bank holidays.&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;Networkingdays = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS('Calendar'),&lt;BR /&gt;'Calendar'[WorkingDay] = 1,&lt;BR /&gt;NOT(&lt;BR /&gt;'Calendar'[Date] IN VALUES('Bank Holidays'[Date])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the Networkingdays per employee, you can use the measure in a table or matrix visual with EmployeeID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2025 11:30:17 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2025-01-17T11:30:17Z</dc:date>
    <item>
      <title>Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369029#M173449</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone can help. I have to calculate the Networkingdays per employee based on their respective Working Model and the Bank Holidays. A Working Model defines which weekdays are the working days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 4 Tables:&lt;BR /&gt;Table Calendar: &lt;U&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt; &lt;/U&gt;I Weekday, whereas Monday is 1, Tuesday 2, Wednesday 3, Thursday 4, Friday 5&lt;BR /&gt;Table Bank Holidays: Bank holiday I &lt;U&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Table Employees: EmployeeID I &lt;STRONG&gt;&lt;U&gt;WorkingsModelID&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Table Working Model: &lt;U&gt;&lt;STRONG&gt;WorkingModelID&lt;/STRONG&gt;&lt;/U&gt; I Workingdays&lt;BR /&gt;&lt;BR /&gt;In the Table Working Model the column Workingdays is a textstring containing the weekdays which are the repsective Workingdays it looks (examples) like this:&lt;BR /&gt;WorkingModelID&amp;nbsp; &amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;Workingdays&lt;BR /&gt;Mo-Fr 40hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;1,2,3,4,5&lt;BR /&gt;Mo-Fr 30hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;1,2,3,4,5&lt;BR /&gt;Mo-Th 20hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I&amp;nbsp; &amp;nbsp;1,2,3,4&lt;BR /&gt;Mo-Tu 16hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I&amp;nbsp; &amp;nbsp;1,2&lt;BR /&gt;Mo-Th 28hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I&amp;nbsp; &amp;nbsp;1,2,3,4&lt;BR /&gt;&lt;BR /&gt;Tables Calendar and Bank Holidays are connected via &lt;U&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tables Employees and Working Model are connected via &lt;STRONG&gt;&lt;U&gt;WorkingModelI&lt;/U&gt;D&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried out a few ways but did not get there - any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 10:57:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369029#M173449</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-17T10:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369058#M173451</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391312" data-lia-user-login="JKross" class="lia-mention lia-mention-user"&gt;JKross&lt;/a&gt;&amp;nbsp;First ensure that the relationships between the tables are correctly set up in the Power BI model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a calculated column in the Calendar table to identify if a day is a working day for each working model.&lt;/P&gt;
&lt;P&gt;WorkingDay = &lt;BR /&gt;VAR CurrentDay = 'Calendar'[Weekday]&lt;BR /&gt;VAR WorkingDaysString = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX('Working Model'[Workingdays]),&lt;BR /&gt;RELATED('Employees'[WorkingModelID]) = 'Working Model'[WorkingModelID]&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;CONTAINSSTRING(WorkingDaysString, FORMAT(CurrentDay, "0")),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure to count the working days excluding bank holidays.&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;Networkingdays = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS('Calendar'),&lt;BR /&gt;'Calendar'[WorkingDay] = 1,&lt;BR /&gt;NOT(&lt;BR /&gt;'Calendar'[Date] IN VALUES('Bank Holidays'[Date])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the Networkingdays per employee, you can use the measure in a table or matrix visual with EmployeeID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 11:30:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369058#M173451</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-01-17T11:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369088#M173455</link>
      <description>&lt;P&gt;I would make some changes to the model. Remove the relationship between Calendar and Bank Holidays and instead add a new column into Calendar to indicate whether it is a Bank Holiday or not. You could do this in DAX like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Is Bank Holiday =
'Calendar'[Date] IN VALUES ( 'Bank Holiday'[Date] )
&lt;/LI-CODE&gt;
&lt;P&gt;Transform your Working Days table to split the comma separated list of days, so that you one entry per day, and so multiple entries for each Working Model. You would not need a relationship between Working Model and Employees.&lt;/P&gt;
&lt;P&gt;You could then write a measure for net working days like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Net working days =
SUMX (
    Employees,
    VAR EmpID = Employees[Employee ID]
    VAR WorkingModelID = Employees[Working Model ID]
    VAR WorkingDays =
        CALCULATETABLE (
            VALUES ( 'Working Model'[Working Days] ),
            'Working Model'[Working Model ID] = WorkingModelID
        )
    VAR Result =
        CALCULATE (
            COUNTROWS ( 'Calendar' ),
            KEEPFILTERS ( TREATAS ( WorkingDays, 'Calendar'[Weekday] ) ),
            KEEPFILTERS ( 'Calendar'[Is Bank Holiday] = FALSE () )
        )
    RETURN
        Result
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Jan 2025 11:50:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369088#M173455</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-01-17T11:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369098#M173457</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you! Unfortunately I have 2 Problems with this:&lt;BR /&gt;a) I have (unfortunately) 41 WorkingModels as they are defined by their Workingdays and Hours per week =&amp;gt; I would like to avoid adding 41 caluclated colums&lt;/P&gt;&lt;P&gt;b) The Calendar Table is and cannot be connected to the Employee table. This in the&amp;nbsp;&lt;SPAN&gt;VAR WorkingDaysString I cannot select the "&lt;/SPAN&gt;&lt;SPAN&gt;RELATED('Employees'[WorkingModelID]) = 'Working Model'[WorkingModelID]"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried something similar before, but it failed as well - I think because the Working Models are not unique in their Working days. Here is what I tried in the Calendar Table per Date:&lt;BR /&gt;Is_Workingday =&lt;BR /&gt;VAR (WeekdayNo) = Calendar (Weekday)&lt;BR /&gt;RETURN&lt;BR /&gt;If(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CONTAINSSTRING(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECTEDVALUE(WorkingModels[Workingdays]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FORMAT(WeekdayNo,"0")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;BR /&gt;1,&lt;BR /&gt;0)&lt;BR /&gt;The calculated table shows 0 for all dates. I think it is becaus the weekday is contained in multiple Working Models, thus textstrings.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to calculate it in a measure? &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 11:54:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369098#M173457</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-17T11:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369158#M173459</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391312" data-lia-user-login="JKross" class="lia-mention lia-mention-user"&gt;JKross&lt;/a&gt;&amp;nbsp;, I agree with&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;, It would be better if you create one table instead of multiple&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 12:38:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369158#M173459</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-01-17T12:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369218#M173464</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;great idea. I converted Calendar with the Bank holidays to true and false. And I converted my WorkingModel Table so that it looks like this - ie. adding 5 columns for the Working days:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WorkingModelID&amp;nbsp; &amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;WD1&amp;nbsp; &amp;nbsp; I WD2&amp;nbsp; &amp;nbsp; &amp;nbsp;I WD3&amp;nbsp; &amp;nbsp; &amp;nbsp;I WD4&amp;nbsp; &amp;nbsp; &amp;nbsp;IWD 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mo-Fr 40hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mo-Fr 30hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mo-Th 20hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mo-Tu 16hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mo-Th 28hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I&amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 4&amp;nbsp;&lt;BR /&gt;We 8hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 3&lt;BR /&gt;Tu,We,Fr 24hrs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I 5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I inserted the NetWorkingdays Measure in the Calendar table - correct?&lt;BR /&gt;&lt;BR /&gt;I get stuck in in the CALCULATETABLE step - the Workingdays are now in multiple colums, where some entries might be empty. VALUES ('WorkingModels [Workingdays]) is not there anymore.&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;How do I link in the new table?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 13:08:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369218#M173464</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-17T13:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369254#M173465</link>
      <description>&lt;P&gt;The Calendar table is fine as a location for the measure, it doesn't really matter which table you put it in.&lt;/P&gt;
&lt;P&gt;I would unpivot the working days table so that there are only 2 columns, Working Model ID and Working Day. There will be multiple rows for each&amp;nbsp;Working Model ID but that is OK.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 13:23:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4369254#M173465</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-01-17T13:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4370982#M173520</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391312" data-lia-user-login="JKross" class="lia-mention lia-mention-user"&gt;JKross&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply from&amp;nbsp;johnt75&amp;nbsp;and&amp;nbsp;bhanu_gautam.&amp;nbsp;I think I'll merge the Employees and Working Model tables into one table as shown below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Networkingdays =
SUM ( Employees[Monday] ) + SUM ( Employees[Tuesday] )
    + SUM ( Employees[Wednesday] )
    + SUM ( Employees[Thursday] )
    + SUM ( Employees[Friday] )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="text-align: justify; text-justify: inter-ideograph;"&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Yang&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Community Support Team&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="text-align: justify; text-justify: inter-ideograph;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white;"&gt;&lt;SPAN&gt;If there is any post &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;Accept it as the solution&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know. &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="background: white;"&gt;&lt;U&gt;&lt;SPAN&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C01%7Cv-yaningyang%40microsoft.com%7C326a6d727194478c197008dbefc04904%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638367381365912356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=7IzyI2%2FMOAR%2FYCjWYSKCZL2VPmT4PsxuWBjdUdMWKzo%3D&amp;amp;reserved=0" target="_blank"&gt;How to get your questions answered quickly&lt;/A&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;-- &lt;/SPAN&gt;&lt;U&gt;&lt;SPAN&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7Cv-yaningyang%40microsoft.com%7C326a6d727194478c197008dbefc04904%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638367381365919045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=VeafzdwAsrpisD8s261%2FdyOwJ1aCtBXS3bPA6NODOHY%3D&amp;amp;reserved=0" target="_blank"&gt;&amp;nbsp;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 03:02:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4370982#M173520</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-20T03:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375298#M173708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;thank you so much for your feedback! I am getting close! Last thing that remains is that now the Result for a Non-Working Day according to the Working Model is 1 and for a Working Day according to the Working Model is 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am checking why that is, do you have any idea?&lt;BR /&gt;&lt;BR /&gt;Worst Case I will substract 1, but I prefer to find the source why it adds 1 Working Day...&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 09:12:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375298#M173708</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-22T09:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375326#M173710</link>
      <description>&lt;P&gt;Can you share a sample PBIX? You can share a link from Google Drive or OneDrive or similar&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 09:24:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375326#M173710</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-01-22T09:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375419#M173715</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;I'd love to, but it is technically impossible unfortunately... I am following all steps and got seemingly blind... Let me see what I can extract. If you give me hints what you need I will take special care of it.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 10:16:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375419#M173715</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-22T10:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375471#M173719</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp; - strangest thing of all: I extracted some data and set up a sample PBIX, and there the calculation works out perfectly! I think I have to follow the steps with the real data myself... Thank you for the hint...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 10:40:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375471#M173719</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-22T10:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375492#M173721</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;found it! The thing is, that in the employee data I have multiple data records, which are distinct in their Valid from and Valid to Date. The Example I was looking at had 2 data records, hence it always added one. I need now to refer the calculation to the Valid from and Valid to Date. Since the working Model can change, I need to take the Working model into account valid on this date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have a good suggestion where to factor this step in shoot ;-)... I am on it!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 10:52:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375492#M173721</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-22T10:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375520#M173727</link>
      <description>&lt;P&gt;We're making progress.&lt;/P&gt;
&lt;P&gt;You can factor the valid dates in like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Net working days =
SUMX (
    Employees,
    VAR EmpID = Employees[Employee ID]
    VAR WorkingModelID = Employees[Working Model ID]
    VAR WorkingDays =
        CALCULATETABLE (
            VALUES ( 'Working Model'[Working Days] ),
            'Working Model'[Working Model ID] = WorkingModelID
        )
    VAR ValidDates =
        DATESBETWEEN ( 'Calendar'[Date], Employees[Valid From], Employees[Valid To] )
    VAR Result =
        CALCULATE (
            COUNTROWS ( 'Calendar' ),
            KEEPFILTERS ( TREATAS ( WorkingDays, 'Calendar'[Weekday] ) ),
            KEEPFILTERS ( 'Calendar'[Is Bank Holiday] = FALSE () ),
            KEEPFILTERS ( ValidDates )
        )
    RETURN
        Result
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Jan 2025 11:10:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375520#M173727</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-01-22T11:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Networkingdays per Employee based on their respective Working Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375559#M173728</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp; I got it! I just inserted another filter in the Countrows to validate if the date is &amp;gt; than Validfrom and &amp;lt;= Validto Date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your sparring, Input and Ideas!!!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 11:43:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Networkingdays-per-Employee-based-on-their-respective-Working/m-p/4375559#M173728</guid>
      <dc:creator>JKross</dc:creator>
      <dc:date>2025-01-22T11:43:30Z</dc:date>
    </item>
  </channel>
</rss>

