<?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: Direct Query - 2 Digit Month Insanity in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1048166#M14239</link>
    <description>&lt;P&gt;glad to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Apr 2020 09:25:09 GMT</pubDate>
    <dc:creator>Stachu</dc:creator>
    <dc:date>2020-04-25T09:25:09Z</dc:date>
    <item>
      <title>Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047327#M14184</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really new to Power BI and Dax, so thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get 2 digit month using Dax and &lt;EM&gt;&lt;STRONG&gt;Direct Query&lt;/STRONG&gt;&lt;/EM&gt;. &amp;nbsp;Ultimately, I am trying to order data visuals correctly, using YYYYMM as my date. &amp;nbsp;I've got the year part figured out and in a column already using YEAR function, which I could concatenate with my new Month columnm, but as lots of people know Dax MONTH function only retrurns single digit Month, e.g. 4 vs 04. &amp;nbsp;In order to correctly order my time data, I would need YYYYMM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked long and hard and almost every solution out there involves Dax functions that are not supported in &lt;STRONG&gt;&lt;EM&gt;Direct Query&lt;/EM&gt;&lt;/STRONG&gt; mode. &amp;nbsp;I've tried FORMAT, IF statements, countless others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My source column has 'date' data with Date, Month, Year, and Time values in it. &amp;nbsp;The column is already formatted as that in Power BI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 15:17:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047327#M14184</guid>
      <dc:creator>FlyBoyNight</dc:creator>
      <dc:date>2020-04-24T15:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047680#M14205</link>
      <description>&lt;P&gt;how about something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;YearMonth = YEAR(Calendar[Date])*100 + MONTH(Calendar[Date])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it will give you YYYYMM as numeric value, but I don't think it should be an issue&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 18:48:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047680#M14205</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2020-04-24T18:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047876#M14217</link>
      <description>&lt;P&gt;Here is a link to a screen shot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/6o9gjfgmn18i2sh/2020-04-24_16-21-22.png?dl=0" target="_blank"&gt;https://www.dropbox.com/s/6o9gjfgmn18i2sh/2020-04-24_16-21-22.png?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My original column is DateofService which I broke out into DateofServce Year and separately Month. &amp;nbsp;Finally your column is DateofServiceYearMonth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateofServiceYearMonth = YEAR(RequestSummary[DateofServiceYear])*100 + MONTH(RequestSummary[DateofServiceMonth])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting random numbers it appears ?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 21:27:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047876#M14217</guid>
      <dc:creator>FlyBoyNight</dc:creator>
      <dc:date>2020-04-24T21:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047891#M14219</link>
      <description>&lt;P&gt;YEAR and MONTH take Date as an argument, with your syntax it's just the number of days starting from 1899-12-31, where 2019 gives year 1905 and 4 gives 1 (January 1900)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can use either&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DateofServiceYearMonth = RequestSummary[DateofServiceYear]*100 + RequestSummary[DateofServiceMonth]&lt;/LI-CODE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DateofServiceYearMonth = YEAR(RequestSummary[DateofService])*100 + MONTH(RequestSummary[DateofService])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Personally I would use the first one&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 21:53:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047891#M14219</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2020-04-24T21:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047919#M14222</link>
      <description>&lt;P&gt;Stachu,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so very, very much. &amp;nbsp;I can't tell you how many hours I spent trying different iterations of other options. &amp;nbsp;This is elegant and perfect for what I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 22:18:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1047919#M14222</guid>
      <dc:creator>FlyBoyNight</dc:creator>
      <dc:date>2020-04-24T22:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1048166#M14239</link>
      <description>&lt;P&gt;glad to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 09:25:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/1048166#M14239</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2020-04-25T09:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/2370453#M60805</link>
      <description>&lt;P&gt;This post really helped me too..Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="10823" data-lia-user-login="Stachu" class="lia-mention lia-mention-user"&gt;Stachu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 15:27:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/2370453#M60805</guid>
      <dc:creator>alexa_0028</dc:creator>
      <dc:date>2022-03-02T15:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/3237199#M119022</link>
      <description>&lt;P&gt;&lt;SPAN&gt;you can use the function Number.ToText as below&lt;/SPAN&gt;&lt;BR /&gt;Number.ToText([MonthNumber],"D2")&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 07:51:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/3237199#M119022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-16T07:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query - 2 Digit Month Insanity</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/4045069#M160438</link>
      <description>&lt;P&gt;worked, amazing&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 01:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Query-2-Digit-Month-Insanity/m-p/4045069#M160438</guid>
      <dc:creator>Mehranmus</dc:creator>
      <dc:date>2024-07-17T01:10:47Z</dc:date>
    </item>
  </channel>
</rss>

