<?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: Medida DAX para calcular o tempo desconsiderando sabado e domingo in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3586311#M138354</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp; boa tarde&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obrigado pela ajuda, tentei a solucao porem nao consegui esta retornando com o erro abaixo&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 19:04:38 GMT</pubDate>
    <dc:creator>luciano1903</dc:creator>
    <dc:date>2023-12-15T19:04:38Z</dc:date>
    <item>
      <title>Medida DAX para calcular o tempo desconsiderando sabado e domingo</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3584590#M138293</link>
      <description>&lt;P&gt;Boa tarde Pessoal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;criei esse medida e gostoria que ela no calculo das horas quando for sabado e domingo nao considera, somente os dias uteis devem ser considerados.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Duracao = &lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Certificados&lt;/SPAN&gt;&lt;SPAN&gt;[DATA INPUT]&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;Certificados&lt;/SPAN&gt;&lt;SPAN&gt;[DATA DE RETORNO]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;HOUR&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Qual seria melhor alternativa para realizar esse medida?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Desde ja agradeco pela ajuda&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 20:12:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3584590#M138293</guid>
      <dc:creator>luciano1903</dc:creator>
      <dc:date>2023-12-14T20:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Medida DAX para calcular o tempo desconsiderando sabado e domingo</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3585169#M138316</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="599644" data-lia-user-login="luciano1903" class="lia-mention lia-mention-user"&gt;luciano1903&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the Input and&amp;nbsp;&lt;SPAN&gt;RETORNO columns have date and time then t&lt;/SPAN&gt;&lt;SPAN&gt;ry this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Duration = 
VAR StartDate = Certificates[DATA INPUT]
VAR EndDate = Certificates[DATA RETORNO]
VAR FullDays = 
    CALCULATE(
        COUNTROWS(
            FILTER(
                CALENDAR(StartDate + 1, EndDate - 1),
                WEEKDAY([Date], 2) &amp;lt; 6
            )
        )
    ) * 24
VAR StartDayHours = 
    IF(
        WEEKDAY(StartDate, 2) &amp;lt; 6,
        24 - HOUR(StartDate),
        0
    )
VAR EndDayHours = 
    IF(
        WEEKDAY(EndDate, 2) &amp;lt; 6,
        HOUR(EndDate),
        0
    )
RETURN
    FullDays + StartDayHours + EndDayHours&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;FullDays Calculation&lt;/STRONG&gt;: Calculates the number of full weekdays between the start and end dates (exclusive of the start and end dates themselves) and multiplies by 24 to get the total hours.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;StartDayHours and EndDayHours&lt;/STRONG&gt;: For the start and end dates, it calculates the hours based on the time of day, but only if they are weekdays.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Final Calculation&lt;/STRONG&gt;: Adds the hours from the full days, start day, and end day.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If those columns have Date value only then try this:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Duration = 
SUMX(
    FILTER(
        CALENDAR(Certificates[DATA INPUT], Certificates[DATA RETURN]),
        WEEKDAY([Date], 2) &amp;lt; 6
    ),
    24
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider &lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Appreciate your Kudos!!&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.credly.com/users/vahid-doustimajd/badges" target="_blank"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank" rel="noopener noreferrer"&gt;LinkedIn&lt;/A&gt; | &lt;A href="https://twitter.com/VahidDMcom" target="_blank" rel="noopener noreferrer"&gt;Twitter&lt;/A&gt; | &lt;A href="https://www.vahiddm.com/" target="_blank" rel="noopener noreferrer"&gt;Blog&amp;nbsp;&lt;/A&gt;| &lt;A href="https://www.youtube.com/channel/UCF-uQfGF8de-EWnR9b2UQhQ" target="_blank" rel="noopener noreferrer"&gt;YouTube&lt;/A&gt;&lt;A href="https://www.youtube.com/channel/UCF-uQfGF8de-EWnR9b2UQhQ" target="_blank" rel="noopener noreferrer"&gt;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 06:20:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3585169#M138316</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2023-12-15T06:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Medida DAX para calcular o tempo desconsiderando sabado e domingo</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3586311#M138354</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp; boa tarde&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obrigado pela ajuda, tentei a solucao porem nao consegui esta retornando com o erro abaixo&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 19:04:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3586311#M138354</guid>
      <dc:creator>luciano1903</dc:creator>
      <dc:date>2023-12-15T19:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Medida DAX para calcular o tempo desconsiderando sabado e domingo</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3627332#M140271</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pode me ajudar com essa solução?&lt;/P&gt;&lt;P&gt;Desde já agradeço.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 17:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Medida-DAX-para-calcular-o-tempo-desconsiderando-sabado-e/m-p/3627332#M140271</guid>
      <dc:creator>luciano1903</dc:creator>
      <dc:date>2024-01-09T17:10:47Z</dc:date>
    </item>
  </channel>
</rss>

