<?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 undefinedTest if a day is a weekday but don't used function weekday in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3793617#M148253</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to test if a day is a weekday or not , I used a calandar table and table of usual date . I used the following commands&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FirstDayIsOH =&lt;BR /&gt;var result = CALCULATE(&lt;BR /&gt;COUNTROWS(TableHeuresBureau),&lt;BR /&gt;DATESBETWEEN(&lt;BR /&gt;TableHeuresBureau[Value],&lt;BR /&gt;'Sheet1'[Start],&lt;BR /&gt;'Sheet1'[Start]&lt;BR /&gt;),&lt;BR /&gt;TableHeuresBureau[JourSemaine] &amp;gt;=2 &amp;amp;&amp;amp; TableHeuresBureau[JourSemaine] &amp;lt;= 6,&lt;BR /&gt;ALL('Sheet1')&lt;BR /&gt;)&lt;BR /&gt;return&lt;BR /&gt;if(ISBLANK(result),false,TRUE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That running perfectly but I'm not satisfy by this , because it seem not a good code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If some people have a better code (used table calandar and table date?&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;I hope I'm clear&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2024 09:40:07 GMT</pubDate>
    <dc:creator>Eric-De</dc:creator>
    <dc:date>2024-03-27T09:40:07Z</dc:date>
    <item>
      <title>undefinedTest if a day is a weekday but don't used function weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3793617#M148253</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to test if a day is a weekday or not , I used a calandar table and table of usual date . I used the following commands&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FirstDayIsOH =&lt;BR /&gt;var result = CALCULATE(&lt;BR /&gt;COUNTROWS(TableHeuresBureau),&lt;BR /&gt;DATESBETWEEN(&lt;BR /&gt;TableHeuresBureau[Value],&lt;BR /&gt;'Sheet1'[Start],&lt;BR /&gt;'Sheet1'[Start]&lt;BR /&gt;),&lt;BR /&gt;TableHeuresBureau[JourSemaine] &amp;gt;=2 &amp;amp;&amp;amp; TableHeuresBureau[JourSemaine] &amp;lt;= 6,&lt;BR /&gt;ALL('Sheet1')&lt;BR /&gt;)&lt;BR /&gt;return&lt;BR /&gt;if(ISBLANK(result),false,TRUE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That running perfectly but I'm not satisfy by this , because it seem not a good code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If some people have a better code (used table calandar and table date?&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;I hope I'm clear&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 09:40:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3793617#M148253</guid>
      <dc:creator>Eric-De</dc:creator>
      <dc:date>2024-03-27T09:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: undefinedTest if a day is a weekday but don't used function weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3795357#M148336</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="590504" data-lia-user-login="Eric-De" class="lia-mention lia-mention-user"&gt;Eric-De&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can use the following measure formula to check if the first date is workday:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FirstDateIsWorkday =
VAR firstDate =
    MIN ( TableHeuresBureau[From] )
RETURN
    IF ( WEEKDAY ( firstDate, 2 ) &amp;lt; 6, "Y", "N" )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 01:22:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3795357#M148336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-28T01:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: undefinedTest if a day is a weekday but don't used function weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3795724#M148350</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Xiaoxin&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank for this reply, but as I said,&amp;nbsp;I would like to avoid using the weekday function. I have already this inforltion in the table and column&amp;nbsp;&lt;SPAN&gt;TableHeuresBureau[JourSemaine]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 06:14:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3795724#M148350</guid>
      <dc:creator>Eric-De</dc:creator>
      <dc:date>2024-03-28T06:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: undefinedTest if a day is a weekday but don't used function weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3801514#M148632</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="590504" data-lia-user-login="Eric-De" class="lia-mention lia-mention-user"&gt;Eric-De&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Perhaps you can try to use format function with 'w' optional parameter, it will return the text number of weekday of the current date based on regular weekday format(Sunday to Saturday)&amp;nbsp;You only need to use Value function to convert it back to number.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/format-function-dax#custom-datetime-formats" target="_blank"&gt;FORMAT function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FirstDateIsWorkday =
VAR firstDate =
    MIN ( TableHeuresBureau[From] )
RETURN
    IF ( VALUE ( FORMAT ( firstDate, "w" ) ) &amp;lt; 6, "Y", "N" )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 07:29:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3801514#M148632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-01T07:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: undefinedTest if a day is a weekday but don't used function weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3803648#M148723</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Xiaoxin&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In fact, I need to determine if the day&amp;nbsp;'Sheet1'[Start] is a officeday or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But thank for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 05:16:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/undefinedTest-if-a-day-is-a-weekday-but-don-t-used-function/m-p/3803648#M148723</guid>
      <dc:creator>Eric-De</dc:creator>
      <dc:date>2024-04-02T05:16:54Z</dc:date>
    </item>
  </channel>
</rss>

