<?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: Dynamic Title to display previous month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Title-to-display-previous-month/m-p/4127835#M163934</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The reason your DAX formula is returning January is that formatting using "MMM" requires a complete date, not just a month number. There are several ways to achieve your desired output, and one approach is as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Previous Month = format(edate(today(),-1),"MMM")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
    <pubDate>Sat, 31 Aug 2024 08:56:04 GMT</pubDate>
    <dc:creator>DataNinja777</dc:creator>
    <dc:date>2024-08-31T08:56:04Z</dc:date>
    <item>
      <title>Dynamic Title to display previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Title-to-display-previous-month/m-p/4127809#M163933</link>
      <description>&lt;P&gt;Hi Folks,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am trying to get dynamic title for my card visual. It should display previous month. I used below DAX.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;abc = &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;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"MMM"&lt;/SPAN&gt;&lt;SPAN&gt;).&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Current Month is&amp;nbsp;&lt;STRONG&gt;Aug,&lt;/STRONG&gt;&amp;nbsp;so result should be &lt;STRONG&gt;Jul&lt;/STRONG&gt;&amp;nbsp;but it give me &lt;STRONG&gt;Jan.&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2024 08:21:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Title-to-display-previous-month/m-p/4127809#M163933</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-31T08:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Title to display previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Title-to-display-previous-month/m-p/4127835#M163934</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The reason your DAX formula is returning January is that formatting using "MMM" requires a complete date, not just a month number. There are several ways to achieve your desired output, and one approach is as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Previous Month = format(edate(today(),-1),"MMM")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2024 08:56:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Title-to-display-previous-month/m-p/4127835#M163934</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2024-08-31T08:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Title to display previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Title-to-display-previous-month/m-p/4128964#M163973</link>
      <description>&lt;P&gt;Thanks to DataNinja777&amp;nbsp; for providing a correct answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I will provide another method for reference:&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;As&amp;nbsp;DataNinja777&amp;nbsp;said, &lt;SPAN&gt;formatting using "MMM" requires a complete date.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So the SWITCH function can be used to manually map the month names:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Previous Month =
SWITCH (
    MONTH ( TODAY () ) - 1,
    1, "Jan",
    2, "Feb",
    3, "Mar",
    4, "Apr",
    5, "May",
    6, "Jun",
    7, "Jul",
    8, "Aug",
    9, "Sep",
    10, "Oct",
    11, "Nov",
    12, "Dec"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Zhu&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any 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;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 06:26:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Title-to-display-previous-month/m-p/4128964#M163973</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-02T06:26:23Z</dc:date>
    </item>
  </channel>
</rss>

