<?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: Dax Week Calculation - Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3053126#M105233</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421688" data-lia-user-login="RenanPNog" class="lia-mention lia-mention-user"&gt;RenanPNog&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Please share your pbix file via link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2023 15:40:55 GMT</pubDate>
    <dc:creator>Payeras_BI</dc:creator>
    <dc:date>2023-01-31T15:40:55Z</dc:date>
    <item>
      <title>Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3049031#M104942</link>
      <description>&lt;P&gt;Hey folks!&lt;BR /&gt;&lt;BR /&gt;I'm having some trouble trying to calculate weeknumbers.... That's because, i have a sells time period, and i want to check how many weeks are left of that period. I've tried DATEDIFF function, and none got the result i was expecting...&lt;BR /&gt;&lt;BR /&gt;I'll give an example based on one product that i have, but i noticed that it applies for the rest as well.&lt;BR /&gt;&lt;BR /&gt;My first date is 26/10/2022, and last is 05/06/2023, there's 222 days in that period, which returns me 31.71428 weeks. As there isn't a 1.5 week, those decimal numbers results on 31 full weeks, and 5 days.&lt;BR /&gt;&lt;BR /&gt;Here's the dax formula i'm using:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And here's my results:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The point is, i do not have 32 weeks, but the formula is rounding and returning me this unexisted additional weeknumber.&lt;BR /&gt;I'm expecting that from day 26/10/2022 to 01/11/2022 is week 31, 02/11/2022 to 08/11/2022 is week 30 and so on.&lt;BR /&gt;&lt;BR /&gt;If i use a rounddown function, that's the result that i get:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Still not giving me the right week number, because it is expected that day 01/11/2022 is week num 31.&lt;BR /&gt;&lt;BR /&gt;I'm cracking my head out to figure it out a way to solve this, and i noticed one thing.... When i get DATEDIFF on days, and then divide by 7 (to bring weeknumbers), that's what i'm getting :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;My decimals results in a pattern that shows me exactly when weeknum should change (except for my first value). For example, the first result is "31.71429"&amp;nbsp; and when day is 01/11/2022, result is "30.85714". But in day 02/11/2022, where i'm expecting weeknum 30, my result is "30.71429" again.... same 0.71429 decimal number.&lt;BR /&gt;&lt;BR /&gt;Maybe that's the key to solve this problem (still trying over here), but to round down every decimal under or equal 0.71429, EXCEPT for my largest value, because in 31.71249 i'm expecting 31 and not 32 value on weeknumber.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 17:20:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3049031#M104942</guid>
      <dc:creator>RenanPNog</dc:creator>
      <dc:date>2023-01-29T17:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3049863#M105012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421688" data-lia-user-login="RenanPNog" class="lia-mention lia-mention-user"&gt;RenanPNog&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your DAX expression and your requirements description, you want to avoid rounding values like "30.85714" and instead round down, right? If this is the case, I recommend that you nest a round-down function RoundDown () in DAX outside when outputting the value of this week, you can refer to this official documentation.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/rounddown-function-dax" target="_blank" rel="noopener"&gt;ROUNDDOWN function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Neeko Tang&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post &amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 09:07:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3049863#M105012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-30T09:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3050962#M105081</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;Unfortunatelly, i don't think ROUNDDOWN function will solve my issue...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;whenever i use a round function, it will only cut my decimals and won't resolve it...&lt;BR /&gt;&lt;BR /&gt;I've pasted another picture, for example:&lt;BR /&gt;Week 31 starts in 26/10, and value is 31,71429. My correct last day of week 31 is 02/11, and the final result gives me 30,71429, the next one (that i want to round down) is 30,57143.&lt;BR /&gt;&lt;BR /&gt;If i set the rounddown function, it will turn this "30,57143" to 31, and that's not what i want.&lt;BR /&gt;&lt;BR /&gt;I noticed this pattern, that every time it gives me this decimal "0,71429" i want to round up, other wise, round down.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;E.G (expected result)&lt;BR /&gt;day&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; current Value&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; expected result&lt;/P&gt;&lt;P&gt;26/10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 31,&lt;EM&gt;71429&lt;/EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31&lt;/P&gt;&lt;P&gt;27/10&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31,57143&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31&lt;/P&gt;&lt;P&gt;28/10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 31,42857&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31&lt;/P&gt;&lt;P&gt;29/10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 31,28571&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31&lt;/P&gt;&lt;P&gt;30/10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 31,14286&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31&lt;/P&gt;&lt;P&gt;31/10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 31,00000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31&lt;/P&gt;&lt;P&gt;01/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30,85714&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31&lt;/P&gt;&lt;P&gt;02/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;30,&lt;EM&gt;71429&lt;/EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;03/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30,57143&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/P&gt;&lt;P&gt;04/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30,42857&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/P&gt;&lt;P&gt;05/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30,28571&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/P&gt;&lt;P&gt;06/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30,14286&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/P&gt;&lt;P&gt;07/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30,00000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/P&gt;&lt;P&gt;08/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 29,85714&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/P&gt;&lt;P&gt;09/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;29,&lt;EM&gt;71429&lt;/EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;29&lt;/STRONG&gt;&lt;BR /&gt;10/11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 29,57143&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;29&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 21:30:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3050962#M105081</guid>
      <dc:creator>RenanPNog</dc:creator>
      <dc:date>2023-01-30T21:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3052518#M105197</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421688" data-lia-user-login="RenanPNog" class="lia-mention lia-mention-user"&gt;RenanPNog&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;And why not using DATEDIFF with WEEK as interval?&lt;BR /&gt;I hardcoded the dates for demonstration purposes.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 11:51:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3052518#M105197</guid>
      <dc:creator>Payeras_BI</dc:creator>
      <dc:date>2023-01-31T11:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3052806#M105209</link>
      <description>&lt;P&gt;Hello, J.Payeras.&lt;BR /&gt;&lt;BR /&gt;The reason is because if i bring week as argument, it won't return me the expected result, check it out:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Also, please, check my top comment, where i show expected weeknum result for each day.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 13:57:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3052806#M105209</guid>
      <dc:creator>RenanPNog</dc:creator>
      <dc:date>2023-01-31T13:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3053126#M105233</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421688" data-lia-user-login="RenanPNog" class="lia-mention lia-mention-user"&gt;RenanPNog&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Please share your pbix file via link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 15:40:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3053126#M105233</guid>
      <dc:creator>Payeras_BI</dc:creator>
      <dc:date>2023-01-31T15:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3053434#M105249</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421688" data-lia-user-login="RenanPNog" class="lia-mention lia-mention-user"&gt;RenanPNog&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Ok, I get what you mean now.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 18:09:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3053434#M105249</guid>
      <dc:creator>Payeras_BI</dc:creator>
      <dc:date>2023-01-31T18:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3558390#M137073</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="267852" data-lia-user-login="Payeras_BI" class="lia-mention lia-mention-user"&gt;Payeras_BI&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm struggling with DAX Datediff week caculation,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;power bi dax No. of weeks = datediff(date(2023,11,15), date(2023,11,28), week) correctly returned result as 2, why did my power bi desktop for this formula No. of weeks = datediff(date(2023,09,06), date(2023,11,28), week) returned result of 12 when it should be 11?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I used co-pilot trying to find solution, one of the suggestions was to use datevalue; and I changed the formula to&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;No&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt; of weeks = &lt;/SPAN&gt;&lt;SPAN&gt;datediff&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATEVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"2023-09-06"&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;datevalue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"2023-11-28"&lt;/SPAN&gt;&lt;SPAN&gt;), week)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The returned result was still 12 instead of 11. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can you suggest what went wrong with the formula please?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In order to get the correct result on my reports for now, I have changed it to&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;No. of weeks = INT(datediff(date(2023,09,06), date(2023,11,28), week))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Nov 2023 09:27:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3558390#M137073</guid>
      <dc:creator>CBT_Dez</dc:creator>
      <dc:date>2023-11-29T09:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Week Calculation - Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3558403#M137074</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Correction:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In order to get the correct result on my reports for now, I have changed it to&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;No. of weeks = INT(datediff(date(2023,09,06), date(2023,11,28), day) / 7)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Nov 2023 09:30:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Week-Calculation-Power-BI/m-p/3558403#M137074</guid>
      <dc:creator>CBT_Dez</dc:creator>
      <dc:date>2023-11-29T09:30:44Z</dc:date>
    </item>
  </channel>
</rss>

