<?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 FORMAT FUNCTION RETURN WRONG MONTH in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FORMAT-FUNCTION-RETURN-WRONG-MONTH/m-p/4298284#M170682</link>
    <description>&lt;P&gt;FORMAT FUNCTION RETURN WRONG MONTH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i am using this format function result showing "January" which is incorrect because today is 23-Nov-2024, please help anyone has solution,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;currnetmonth =&lt;/SPAN&gt; &lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()),&lt;/SPAN&gt;&lt;SPAN&gt;"mmm&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;currnetmonth =&lt;/SPAN&gt; &lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()),&lt;/SPAN&gt;&lt;SPAN&gt;"mmmm&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Nov 2024 15:24:36 GMT</pubDate>
    <dc:creator>proavinash</dc:creator>
    <dc:date>2024-11-23T15:24:36Z</dc:date>
    <item>
      <title>FORMAT FUNCTION RETURN WRONG MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FORMAT-FUNCTION-RETURN-WRONG-MONTH/m-p/4298284#M170682</link>
      <description>&lt;P&gt;FORMAT FUNCTION RETURN WRONG MONTH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i am using this format function result showing "January" which is incorrect because today is 23-Nov-2024, please help anyone has solution,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;currnetmonth =&lt;/SPAN&gt; &lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()),&lt;/SPAN&gt;&lt;SPAN&gt;"mmm&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;currnetmonth =&lt;/SPAN&gt; &lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()),&lt;/SPAN&gt;&lt;SPAN&gt;"mmmm&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2024 15:24:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FORMAT-FUNCTION-RETURN-WRONG-MONTH/m-p/4298284#M170682</guid>
      <dc:creator>proavinash</dc:creator>
      <dc:date>2024-11-23T15:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT FUNCTION RETURN WRONG MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FORMAT-FUNCTION-RETURN-WRONG-MONTH/m-p/4298322#M170686</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="859703" data-lia-user-login="proavinash" class="lia-mention lia-mention-user"&gt;proavinash&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because you have an extra MONTH in your formula, this will return the current month 11, and then FORMAT formats the value 11, so it returns January. Because DAX dates from 1900-1-1, so 11 represents 1900-1-11, so return January.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try below formula.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;currnetmonth = FORMAT(TODAY(),"mmmm")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-immersive-translate-walked="4f8fb55e-754f-4083-9645-4a20af48e593" data-immersive-translate-paragraph="1"&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;
&lt;P data-immersive-translate-walked="4f8fb55e-754f-4083-9645-4a20af48e593"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-immersive-translate-walked="4f8fb55e-754f-4083-9645-4a20af48e593" data-immersive-translate-paragraph="1"&gt;Thank you~&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2024 16:34:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FORMAT-FUNCTION-RETURN-WRONG-MONTH/m-p/4298322#M170686</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-11-23T16:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT FUNCTION RETURN WRONG MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FORMAT-FUNCTION-RETURN-WRONG-MONTH/m-p/4298647#M170692</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="859703" data-lia-user-login="proavinash" class="lia-mention lia-mention-user"&gt;proavinash&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The reply you got from&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp;is very precise, I will just perhaps offer some more illustration and a general recommendation. If you have issues with outputs of nested functions, it's worth seeing what the nested part actually returns.&lt;/P&gt;&lt;P&gt;So all the 'date part' functions like month actually return an integer, which you can see here:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;However, the format function expects a date so when you pass 11 to format function, it is treated exactly as a date so 11th day since the beginning of DAX internal calendar. You can see a similar behaviour e.g. in Excel: if you format a date as a whole number, you will see the nuber of days which passed since thebeginning of Excel's internal calendar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To avoid this, always pass raw date into format functions like that and result should be as expected:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hope this can help too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2024 13:33:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FORMAT-FUNCTION-RETURN-WRONG-MONTH/m-p/4298647#M170692</guid>
      <dc:creator>KaeRHa</dc:creator>
      <dc:date>2024-11-24T13:33:50Z</dc:date>
    </item>
  </channel>
</rss>

