<?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: Reformat Month Number (where January = 1) to Text Format Returning &amp;quot;01&amp;quot; instead of &amp;quot;1&amp;quot; in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Reformat-Month-Number-where-January-1-to-Text-Format-Returning/m-p/2303189#M56948</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="284147" data-lia-user-login="maibacherstr" class="lia-mention lia-mention-user"&gt;maibacherstr&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
    VAR __MonthNumberText = MONTH([Date]) &amp;amp; ""
    VAR __Length = LEN(__MonthNumberText)
RETURN
    IF(__Length = 1, "0" &amp;amp; __MonthNumberText,__MonthNumberText)&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 26 Jan 2022 15:33:04 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2022-01-26T15:33:04Z</dc:date>
    <item>
      <title>Reformat Month Number (where January = 1) to Text Format Returning "01" instead of "1"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Reformat-Month-Number-where-January-1-to-Text-Format-Returning/m-p/2303183#M56947</link>
      <description>&lt;P&gt;Hello Community, I'm comfortable in Power Query and DAX, but am returning errors when trying to convert month number to a text format while applying IF or SWITCH comparisons and adding a transformation after that. ("DAX comparison operations do not support comparing values of type Text with values of type Integer"). My error formula starts like: IF(MonthNumber &amp;lt; 10, then concatenate "0" and MonthNumber. This cannot be done even while I'm tangling with helper columns).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The real problem to solve is in the subject line. To expand on the problem: I have a few date columns including Month Number (numerical format) which I need to convert to an alphabetized text column. The issue seems simple, which is that months January through September are single digit, meaning I need to plug in a zero before the single digit. Thus, the column will alphabetize from 01 to 12. Without this, the alphabetized column goes: 10, 11, 12, 1, 2, 3... (incorrect!).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm happy to pursue solutions in Power Query and/or DAX. Can anyone see through this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MANY THANKS&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:27:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Reformat-Month-Number-where-January-1-to-Text-Format-Returning/m-p/2303183#M56947</guid>
      <dc:creator>maibacherstr</dc:creator>
      <dc:date>2022-01-26T15:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Month Number (where January = 1) to Text Format Returning "01" instead of "1"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Reformat-Month-Number-where-January-1-to-Text-Format-Returning/m-p/2303189#M56948</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="284147" data-lia-user-login="maibacherstr" class="lia-mention lia-mention-user"&gt;maibacherstr&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
    VAR __MonthNumberText = MONTH([Date]) &amp;amp; ""
    VAR __Length = LEN(__MonthNumberText)
RETURN
    IF(__Length = 1, "0" &amp;amp; __MonthNumberText,__MonthNumberText)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:33:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Reformat-Month-Number-where-January-1-to-Text-Format-Returning/m-p/2303189#M56948</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-01-26T15:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat Month Number (where January = 1) to Text Format Returning "01" instead of "1"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Reformat-Month-Number-where-January-1-to-Text-Format-Returning/m-p/2303195#M56949</link>
      <description>&lt;P&gt;Sir that was amazing! You also gained a Twitter follower. Solution accepted, have a great day.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:36:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Reformat-Month-Number-where-January-1-to-Text-Format-Returning/m-p/2303195#M56949</guid>
      <dc:creator>maibacherstr</dc:creator>
      <dc:date>2022-01-26T15:36:51Z</dc:date>
    </item>
  </channel>
</rss>

