<?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: DAX for date column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955210#M10909</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for coming back to me. I'm now trying to do this in Power query but it hasn't worked. Using the add custom column option I have done:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;= Table.AddColumn(#"Renamed Columns2", "Custom", each if[Column A]=""then[Column B]else[Column A])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;and it isn't working. The only value that is returning in the new custom column is the value of column A.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Any ideas?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Mar 2020 12:32:18 GMT</pubDate>
    <dc:creator>EmilyM2019</dc:creator>
    <dc:date>2020-03-02T12:32:18Z</dc:date>
    <item>
      <title>DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955121#M10900</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am stuck with a DAX if someone can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 2 date columns, Column A and Column B.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a new column (Column C) that will look and see if there is a value in Column A, if it is blank it picks up the value from Column B. If Column A isn't blank then it populates Column C with that value. As per the table below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA, Emily.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Column A&lt;/TD&gt;&lt;TD&gt;Column B&lt;/TD&gt;&lt;TD&gt;Column C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;03/02/2020&lt;/TD&gt;&lt;TD&gt;03/02/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/01/2020&lt;/TD&gt;&lt;TD&gt;21/01/2020&lt;/TD&gt;&lt;TD&gt;02/01/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;13/01/2020&lt;/TD&gt;&lt;TD&gt;01/02/2020&lt;/TD&gt;&lt;TD&gt;13/01/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;19/01/2020&lt;/TD&gt;&lt;TD&gt;03/02/2020&lt;/TD&gt;&lt;TD&gt;19/01/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24/12/2019&lt;/TD&gt;&lt;TD&gt;31/12/2019&lt;/TD&gt;&lt;TD&gt;24/12/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;15/12/2019&lt;/TD&gt;&lt;TD&gt;15/12/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;30/12/2020&lt;/TD&gt;&lt;TD&gt;30/12/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 02 Mar 2020 11:25:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955121#M10900</guid>
      <dc:creator>EmilyM2019</dc:creator>
      <dc:date>2020-03-02T11:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955148#M10903</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="177444" data-lia-user-login="EmilyM2019" class="lia-mention lia-mention-user"&gt;EmilyM2019&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date = if(isblank('Table'[ColumnA]);'Table'[ColumnB];'Table'[ColumnA])&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 11:43:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955148#M10903</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-02T11:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955155#M10906</link>
      <description>&lt;P&gt;Hi there. You should consider do this in Power Query over the query editor. If you want DAX use the first answer, if you want power query try adding a custom column like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if [ColumnA] = "" then [ColumnB] else [ColumnA]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just ask if columnA is blank and you can get the true false with the columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 11:49:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955155#M10906</guid>
      <dc:creator>ibarrau</dc:creator>
      <dc:date>2020-03-02T11:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955210#M10909</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for coming back to me. I'm now trying to do this in Power query but it hasn't worked. Using the add custom column option I have done:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;= Table.AddColumn(#"Renamed Columns2", "Custom", each if[Column A]=""then[Column B]else[Column A])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;and it isn't working. The only value that is returning in the new custom column is the value of column A.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Any ideas?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 12:32:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955210#M10909</guid>
      <dc:creator>EmilyM2019</dc:creator>
      <dc:date>2020-03-02T12:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955217#M10910</link>
      <description>&lt;P&gt;I'm sorry I forget to add the null cases too. Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if [ColumnA] = "" or [ColumnA] = null then [ColumnB] else [ColumnA]&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 12:35:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955217#M10910</guid>
      <dc:creator>ibarrau</dc:creator>
      <dc:date>2020-03-02T12:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955233#M10911</link>
      <description>&lt;P&gt;Thank you, this has worked, hurrah.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to build on this how would I do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If column A and column B are blank then return todays date?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 12:52:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955233#M10911</guid>
      <dc:creator>EmilyM2019</dc:creator>
      <dc:date>2020-03-02T12:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955257#M10913</link>
      <description>&lt;P&gt;Well it should be similar&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if [ColumnA] = "" or [ColumnA] = null then
if [ColumnB] = "" or [ColumnB] = null then 
DateTime.LocalNow() 
else [ColumnB] else [ColumnA]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can continue adding if statements in the "then" or "else" in case you need them.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 13:12:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955257#M10913</guid>
      <dc:creator>ibarrau</dc:creator>
      <dc:date>2020-03-02T13:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955504#M10932</link>
      <description>&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 15:57:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-date-column/m-p/955504#M10932</guid>
      <dc:creator>EmilyM2019</dc:creator>
      <dc:date>2020-03-02T15:57:58Z</dc:date>
    </item>
  </channel>
</rss>

