<?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 DATESMTD IS NOT WOKING AS EXPECTED in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029551#M103475</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am building a new table called "Date Period" based on my date dimension table.&lt;/P&gt;&lt;P&gt;Below shown is the dax I used to create the new table and columns.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Date Period = &lt;/SPAN&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;Dim_Date&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Type"&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;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;as shown in the picture, I have the date 1/1/2023 for this month in the date dimension table.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;but my new table is giving me a differnet date in 2024. please see the undelined date above.&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here. Can anyone help ?&lt;/P&gt;&lt;P&gt;My date dimension contains dates until 2024. is it because of that I am getting MTD date as different ?&lt;/P&gt;&lt;P&gt;How can I get the MTD based on the current month ?&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 20:09:26 GMT</pubDate>
    <dc:creator>aswathyjoe</dc:creator>
    <dc:date>2023-01-18T20:09:26Z</dc:date>
    <item>
      <title>DATESMTD IS NOT WOKING AS EXPECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029551#M103475</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am building a new table called "Date Period" based on my date dimension table.&lt;/P&gt;&lt;P&gt;Below shown is the dax I used to create the new table and columns.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Date Period = &lt;/SPAN&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;Dim_Date&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Type"&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;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;as shown in the picture, I have the date 1/1/2023 for this month in the date dimension table.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;but my new table is giving me a differnet date in 2024. please see the undelined date above.&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here. Can anyone help ?&lt;/P&gt;&lt;P&gt;My date dimension contains dates until 2024. is it because of that I am getting MTD date as different ?&lt;/P&gt;&lt;P&gt;How can I get the MTD based on the current month ?&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 20:09:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029551#M103475</guid>
      <dc:creator>aswathyjoe</dc:creator>
      <dc:date>2023-01-18T20:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: DATESMTD IS NOT WOKING AS EXPECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029561#M103478</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="501078" data-lia-user-login="aswathyjoe" class="lia-mention lia-mention-user"&gt;aswathyjoe&lt;/a&gt;&amp;nbsp;.MTD returns the value in Date/time format.&amp;nbsp; Can you try changing the data type of the column to be Date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AnthonyJoseph&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 19:56:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029561#M103478</guid>
      <dc:creator>AnthonyJoseph</dc:creator>
      <dc:date>2023-01-18T19:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: DATESMTD IS NOT WOKING AS EXPECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029566#M103480</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Anthony, Thnaks for the reply.&lt;/P&gt;&lt;P&gt;I tried changing it. please see below. its still giveing a date in 2024&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>Wed, 18 Jan 2023 19:58:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029566#M103480</guid>
      <dc:creator>aswathyjoe</dc:creator>
      <dc:date>2023-01-18T19:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: DATESMTD IS NOT WOKING AS EXPECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029914#M103505</link>
      <description>&lt;P&gt;I'm a bit confused as to what you're trying to do and what is stated in the original post.&lt;/P&gt;
&lt;P&gt;Have you created a one row table and you don't know where it comes from?&amp;nbsp; It's probably the last date in the dim_date table.&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;
&lt;P&gt;What is it you are trying to do?&amp;nbsp; Can you post some sample data and the desired result please?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 00:47:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESMTD-IS-NOT-WOKING-AS-EXPECTED/m-p/3029914#M103505</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2023-01-19T00:47:59Z</dc:date>
    </item>
  </channel>
</rss>

