<?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: Power Query Date in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-Date/m-p/2067700#M60880</link>
    <description>&lt;P&gt;Yes!&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81111" data-lia-user-login="HotChilli" class="lia-mention lia-mention-user"&gt;HotChilli&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 09 Sep 2021 23:19:14 GMT</pubDate>
    <dc:creator>o59393</dc:creator>
    <dc:date>2021-09-09T23:19:14Z</dc:date>
    <item>
      <title>Power Query Date</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-Date/m-p/2067666#M60876</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get the date (YYYY/MM/DD) in power query using an IF statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to have the year dynamic to today's year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example if Attribute column is "Production January (real and/or forecast) then return":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Today's Year/1/1 or in other words 2021/1/1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the following M code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(#"Filtered Rows1", "Custom", each if [Attribute] = "Production January (real and/or forecast)" then Date.Month(#datetime(Date.Year(DateTime.LocalNow()),1,1))
 else 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the error:&lt;/P&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;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 22:24:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-Date/m-p/2067666#M60876</guid>
      <dc:creator>o59393</dc:creator>
      <dc:date>2021-09-09T22:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query Date</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-Date/m-p/2067694#M60879</link>
      <description>&lt;P&gt;Can't read the error (the picture is too small).&lt;/P&gt;
&lt;P&gt;Looks like it says error in the cell so just click in the cell - not on the error - and it will display underneath.&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;
&lt;P&gt;Having said that, it looks like you are creating a #datetime and you want a #date, so try that&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 23:13:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-Date/m-p/2067694#M60879</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2021-09-09T23:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query Date</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-Date/m-p/2067700#M60880</link>
      <description>&lt;P&gt;Yes!&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81111" data-lia-user-login="HotChilli" class="lia-mention lia-mention-user"&gt;HotChilli&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 23:19:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-Date/m-p/2067700#M60880</guid>
      <dc:creator>o59393</dc:creator>
      <dc:date>2021-09-09T23:19:14Z</dc:date>
    </item>
  </channel>
</rss>

