<?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: Extract date from a column with date time in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519411#M29603</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235560" data-lia-user-login="montiell" class="lia-mention lia-mention-user"&gt;montiell&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should work. You're probably doing something incorrectly. See it all at work in the attached file. Pay particular attention to the data types&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 21:42:59 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2020-11-26T21:42:59Z</dc:date>
    <item>
      <title>Extract date from a column with date time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519339#M29594</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am practically still new with power bi dax formulas and I am trying to accomplish to create a new colum or date hirearchy. My current colum data is format as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;11/26/2020 5:03:41 AM EST&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;I would like to create a column with &lt;STRONG&gt;mm/dd/yyyy&lt;/STRONG&gt; but i cant figured it out. I tried this dax formula:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;Completed-MonthYear = FORMAT([DATACOLUMN],"m/dd/yyyy")&lt;/STRONG&gt; but it didnt work, I got the erros message:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;Cannot convert value '' of type Text to type Date.&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;I tried converting the date from DATACOLUM into date but i got the same error msg.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help or guidence is really appreciated!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks and Happy holidays!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Luis F Montiel&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Nov 2020 18:46:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519339#M29594</guid>
      <dc:creator>montiell</dc:creator>
      <dc:date>2020-11-26T18:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Extract date from a column with date time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519347#M29595</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235560" data-lia-user-login="montiell" class="lia-mention lia-mention-user"&gt;montiell&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Completed-MonthYear = DATEVALUE( [DATACOLUMN] )
&lt;/LI-CODE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Completed-MonthYear = INT( [DATACOLUMN] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;then convert the column to date&amp;nbsp; and choose the format you prefer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 18:58:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519347#M29595</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-11-26T18:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extract date from a column with date time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519351#M29597</link>
      <description>&lt;P&gt;Hi AIB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried both and got the same error,&amp;nbsp;&lt;EM&gt;Cannot convert value '' of type Text to type Date.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 19:07:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519351#M29597</guid>
      <dc:creator>montiell</dc:creator>
      <dc:date>2020-11-26T19:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract date from a column with date time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519411#M29603</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235560" data-lia-user-login="montiell" class="lia-mention lia-mention-user"&gt;montiell&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should work. You're probably doing something incorrectly. See it all at work in the attached file. Pay particular attention to the data types&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 21:42:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1519411#M29603</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-11-26T21:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract date from a column with date time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1521265#M29654</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235560" data-lia-user-login="montiell" class="lia-mention lia-mention-user"&gt;montiell&lt;/a&gt;&amp;nbsp; Hey mate ,&lt;BR /&gt;you have to convert date to date format first as it is a text feild right now .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;"Completed-MonthYear = FORMAT([DATACOLUMN],"m/dd/yyyy")&lt;/STRONG&gt;&amp;nbsp;but it didnt work, I got the erros message:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;Cannot convert value '' of type Text to type Date.&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;I tried converting the date from DATACOLUM into date but i got the same error msg."&lt;BR /&gt;&lt;BR /&gt;first convert /format it is as a date coloum then use your formula it will work.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Completed-MonthYear = FORMAT([DATACOLUMN],"m/dd/yyyy")&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;it will work thank you&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Nov 2020 16:36:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1521265#M29654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-27T16:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extract date from a column with date time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1521294#M29659</link>
      <description>&lt;P&gt;I think you are right, but Everytime i tried to converted i receive the following msg:&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;I think is because my date include the time zone:&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;and after the error of the formula this appears on my calculated column:&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;I think If i can resolve the issue with the data type and be able to converted as date it will get fix, sadly i keep receiving the same error everytime &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 16:45:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1521294#M29659</guid>
      <dc:creator>montiell</dc:creator>
      <dc:date>2020-11-27T16:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract date from a column with date time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1521638#M29689</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235560" data-lia-user-login="montiell" class="lia-mention lia-mention-user"&gt;montiell&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this mcode:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjTUNzLTNzIwMlAwtTIwtjIxVHD0VXANDlGKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Split Column by Delimiter" = Table.SplitColumn(Source, "Column1", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, true), {"Column1.1", "Column1.2"}),
    #"Changed Type with Locale" = Table.TransformColumnTypes(#"Split Column by Delimiter", {{"Column1.1", type datetimezone}}, "en-US"),
    #"Inserted Date" = Table.AddColumn(#"Changed Type with Locale", "Date", each DateTime.Date([Column1.1]), type date)
in
    #"Inserted Date"&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 28 Nov 2020 03:06:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-date-from-a-column-with-date-time/m-p/1521638#M29689</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-11-28T03:06:54Z</dc:date>
    </item>
  </channel>
</rss>

