<?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 function to register MTD, QTD and other giving wrong results. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-function-to-register-MTD-QTD-and-other-giving-wrong-results/m-p/3906811#M152200</link>
    <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="740140" data-lia-user-login="Elieazar" class="lia-mention lia-mention-user"&gt;Elieazar&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first thing to check is whether your date table ('Période Comptable') is properly set up:&lt;BR /&gt;&lt;STRONG&gt;Continuous Dates:&lt;/STRONG&gt; Your date table should ideally have a row for every single day in the year, not just the first of each month. Date intelligence functions expect a full range of dates to calculate periods correctly.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;STRONG&gt;Mark as Date Table:&lt;/STRONG&gt; In Power BI, ensure that your date table is marked as a date table. You can do this by going to the "Modeling" tab and selecting "Mark as Date Table", then choose the column that has the date.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;If the above suggestions don't help you solve the problem, please&lt;/FONT&gt;&amp;nbsp;provide detailed sample pbix file and the results you expect.So that I can help you better. Please remove any sensitive data in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 01:26:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-10T01:26:12Z</dc:date>
    <item>
      <title>DAX function to register MTD, QTD and other giving wrong results.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-function-to-register-MTD-QTD-and-other-giving-wrong-results/m-p/3905878#M152158</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a data slicer with various period filters such as MTD, QTD, YTD ...&lt;BR /&gt;I have already created a specific table that gives me 12 rows with each row being the first of each month from January till December of 2024.&lt;BR /&gt;However, when i use each periodic function, it's giving me the wrong result as if the end date is December 2024...&lt;BR /&gt;For example, this is the DAX function for each period :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Union&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATESMTD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Période Comptable'&lt;/SPAN&gt;&lt;SPAN&gt;[Mois]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Période"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"MTD"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATESQTD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Période Comptable'&lt;/SPAN&gt;&lt;SPAN&gt;[Mois]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Période"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"QTD"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATESYTD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Période Comptable'&lt;/SPAN&gt;&lt;SPAN&gt;[Mois]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Période"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"YTD"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;But as you can see in the attached picture, it shows MTD row as December 2024, QTD it's giving me the last quarter of the year and YTD it's giving me the entire year...&lt;BR /&gt;Help pleasse.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Elie AZAR&lt;BR /&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 09 May 2024 14:39:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-function-to-register-MTD-QTD-and-other-giving-wrong-results/m-p/3905878#M152158</guid>
      <dc:creator>Elieazar</dc:creator>
      <dc:date>2024-05-09T14:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX function to register MTD, QTD and other giving wrong results.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-function-to-register-MTD-QTD-and-other-giving-wrong-results/m-p/3906811#M152200</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="740140" data-lia-user-login="Elieazar" class="lia-mention lia-mention-user"&gt;Elieazar&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first thing to check is whether your date table ('Période Comptable') is properly set up:&lt;BR /&gt;&lt;STRONG&gt;Continuous Dates:&lt;/STRONG&gt; Your date table should ideally have a row for every single day in the year, not just the first of each month. Date intelligence functions expect a full range of dates to calculate periods correctly.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;STRONG&gt;Mark as Date Table:&lt;/STRONG&gt; In Power BI, ensure that your date table is marked as a date table. You can do this by going to the "Modeling" tab and selecting "Mark as Date Table", then choose the column that has the date.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;If the above suggestions don't help you solve the problem, please&lt;/FONT&gt;&amp;nbsp;provide detailed sample pbix file and the results you expect.So that I can help you better. Please remove any sensitive data in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 01:26:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-function-to-register-MTD-QTD-and-other-giving-wrong-results/m-p/3906811#M152200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-10T01:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX function to register MTD, QTD and other giving wrong results.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-function-to-register-MTD-QTD-and-other-giving-wrong-results/m-p/3907732#M152228</link>
      <description>&lt;P&gt;Hello Jayleny,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply and sorry for my late response.&lt;/P&gt;&lt;P&gt;Here are my responses :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;My date table is marked as a date so no problems there.&lt;/LI&gt;&lt;LI&gt;I tried a test with a row for each day of the year but the result was wrong as if i was in december 2024 like in my explanation but for a longer period&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;As for what i want :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I wand to be able to create a table with 2 columns :&lt;OL&gt;&lt;LI&gt;the first column is the date ranges&lt;/LI&gt;&lt;LI&gt;the 2nd is MTD, QTD, YTD and other specifics i can add on one the first ones are functional. Evidentally the MTD, QTD and YTD should have the end period of today and not december 2024.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Eventually, i want to create a slicer with this MTD, QTD and YTD table (cf. attached picture)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1a66d2SJOmkV-kPa1_nGDk8UvoJDXP3DN/view?usp=drive_link" target="_self"&gt;Please find the PBIx file with just the dates as well as the new table i tried to create&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Elie AZAR&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 08:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-function-to-register-MTD-QTD-and-other-giving-wrong-results/m-p/3907732#M152228</guid>
      <dc:creator>Elieazar</dc:creator>
      <dc:date>2024-05-10T08:01:53Z</dc:date>
    </item>
  </channel>
</rss>

