<?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: Row context problem in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3296162#M122807</link>
    <description>&lt;P&gt;Doesnt work. At least for two reasons:&lt;/P&gt;&lt;P&gt;1) I only have listed working days in my database&lt;BR /&gt;2) and even if a consider the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Var Firstday = STARTOFMONTH(Tab_Origem[Data])
Var EndDay = ENDOFMONTH(Tab_Origem[Data])
Var HolidayDate = CALCULATETABLE(VALUES(Tab_Origem[Data]), 'Tab_Origem'[Holidays] = "Yes")

Var Net =
    NETWORKDAYS(Firstday, EndDay, 1, HolidayDate)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;It does the same mistake/problem that I had in the first post, and that is : Whenever the Tab_Origem[ Holidays] is "Yes" the corresponding date always has one less total day. Using the code i wrote here , the result is:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As you see the May 1st as one less day.&lt;/P&gt;&lt;P&gt;I want, in May , all days to be 30 because i only have 1 holiday in this month and all the other are workingdays.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2023 17:43:43 GMT</pubDate>
    <dc:creator>Kebas_Leech</dc:creator>
    <dc:date>2023-06-21T17:43:43Z</dc:date>
    <item>
      <title>Row context problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3295356#M122758</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a daily target measure that calculates the targets for each day of the month&amp;nbsp;based on a fixed monthly target: (the daily target is always the same each day of that specific month).&lt;/P&gt;&lt;P&gt;So i had to calculate the [NumberDaysMonth] and filter it according to the respective holidays of that month.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Total NumberDaysMonth = 
Var TotalDays =
SUMX (
    SUMMARIZE (
        ADDCOLUMNS (
            VALUES ( Tab_Origem[Data] ),
            "EOMonth", EOMONTH ( Tab_Origem[Data], 0 )
        ),
        [EOMonth]
    ),
    DAY ( [EOMonth] )
)
Var NrHolidays = 
   SUMX(
    SUMMARIZE(
        Tab_Origem,
        Tab_Origem[Data],
        Tab_Origem[Holidays],
        "Count", COUNTROWS(Tab_Origem)
    ),
    IF( Tab_Origem[Holidays] = "Yes", [Count], 0)
)

RETURN TotalDays-NrHolidays&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is that it calculates on a row filter context based on the holiday day (1st of May). I need all remaining May days to have the same number as the respective lowest value calculated. In my example its 30 so I need all May days&amp;nbsp; to be 30. If it had two holidays it needed to be 29, and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I manage that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 11:03:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3295356#M122758</guid>
      <dc:creator>Kebas_Leech</dc:creator>
      <dc:date>2023-06-21T11:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Row context problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3295384#M122761</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377760" data-lia-user-login="Kebas_Leech" class="lia-mention lia-mention-user"&gt;Kebas_Leech&lt;/a&gt;&amp;nbsp;it seems you need to calculate NETWORKDAYS. Check links with examples. Hope this help&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/networkdays-dax" target="_self"&gt;https://learn.microsoft.com/en-us/dax/networkdays-dax&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dax.guide/networkdays/" target="_self"&gt;https://dax.guide/networkdays/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 11:15:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3295384#M122761</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-06-21T11:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Row context problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3295541#M122776</link>
      <description>&lt;P&gt;CountHolidays =&amp;nbsp;&lt;BR /&gt;VAR holidays = MINX(FILTER('TableName', [Holiday] = True), COUNT('TableName'))&lt;BR /&gt;VAR selectedmonth = CALCULATE(COUNTROWS('TableName'), [Month] = SELECTEDVALUE[Month] &amp;amp;&amp;amp;&amp;nbsp; [Hloday] &amp;lt;&amp;gt; True)&lt;BR /&gt;RETURN&lt;BR /&gt;&amp;nbsp;IF([Holiday] = True, holidays, selectedmonth)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 12:11:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3295541#M122776</guid>
      <dc:creator>devanshi</dc:creator>
      <dc:date>2023-06-21T12:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Row context problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3296162#M122807</link>
      <description>&lt;P&gt;Doesnt work. At least for two reasons:&lt;/P&gt;&lt;P&gt;1) I only have listed working days in my database&lt;BR /&gt;2) and even if a consider the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Var Firstday = STARTOFMONTH(Tab_Origem[Data])
Var EndDay = ENDOFMONTH(Tab_Origem[Data])
Var HolidayDate = CALCULATETABLE(VALUES(Tab_Origem[Data]), 'Tab_Origem'[Holidays] = "Yes")

Var Net =
    NETWORKDAYS(Firstday, EndDay, 1, HolidayDate)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;It does the same mistake/problem that I had in the first post, and that is : Whenever the Tab_Origem[ Holidays] is "Yes" the corresponding date always has one less total day. Using the code i wrote here , the result is:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As you see the May 1st as one less day.&lt;/P&gt;&lt;P&gt;I want, in May , all days to be 30 because i only have 1 holiday in this month and all the other are workingdays.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 17:43:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3296162#M122807</guid>
      <dc:creator>Kebas_Leech</dc:creator>
      <dc:date>2023-06-21T17:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Row context problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3296174#M122808</link>
      <description>&lt;P&gt;Couldnt make that measure to work.&lt;/P&gt;&lt;P&gt;[Holidays] is not a measure but a columm -&amp;gt; Tab_Origem[Holidays].&lt;BR /&gt;I dont have any measure named [Month] only a data column named Tab_Origem[Data]&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 17:52:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3296174#M122808</guid>
      <dc:creator>Kebas_Leech</dc:creator>
      <dc:date>2023-06-21T17:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Row context problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3297407#M122884</link>
      <description>&lt;P&gt;Link with the pbix file:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1XuChGEFZd-GZ2n3jm6AmzqrnomLmHeja/view?usp=drive_link" target="_blank"&gt;https://drive.google.com/file/d/1XuChGEFZd-GZ2n3jm6AmzqrnomLmHeja/view?usp=drive_link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result needed:&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, 22 Jun 2023 09:30:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-context-problem/m-p/3297407#M122884</guid>
      <dc:creator>Kebas_Leech</dc:creator>
      <dc:date>2023-06-22T09:30:29Z</dc:date>
    </item>
  </channel>
</rss>

