<?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: Null Values in Date Column in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856682#M984635</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460264" data-lia-user-login="Steffen1" class="lia-mention lia-mention-user"&gt;Steffen1&lt;/a&gt;&amp;nbsp;- it looks like you need to change something in Power Query to allow the Dax to work.&amp;nbsp; If you see the following images, the left contains (blank).&amp;nbsp; This is the desired result in data model.&amp;nbsp; Contrast this with the right, which is populated with text string "(Null)"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This is how the (Blank) and "(Null)" text string appears in Power Query.&amp;nbsp; We need the result on the left.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I would suggest using "Replace Values" to turn the string (Null) to null.&amp;nbsp; keep the null in lowercase so Power Query recognises this as null instead of "Null" or "NULL".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also make sure that Data Type for the column is Date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;Daryl&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Oct 2022 08:24:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-22T08:24:29Z</dc:date>
    <item>
      <title>Null Values in Date Column</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856315#M984536</link>
      <description>&lt;P&gt;Dear Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´ve already seen some post on this topic, but it kinda not solved my problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a report that shows me the ship date for an order. However, if the order hasn´t shipped yet, the ship date will be blank - hence the value is null.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my query i have a custom column where I want to do a logic check if there is a specific ship date as value or if the value is null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the condition: if [shipdate] &amp;lt;&amp;gt; null then true-expression else false-expression -&amp;gt; the logic check works and returns the "true result" correctly, but for the "false result" I receive the error message: "[Expression.Error] The value "null" cann´t be converted to type logical"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I change the condition as following: if [shipdate] = null then true-expression else false-expression -&amp;gt; it returns the "true result" correctly again and the error message as the "false result"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Full code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [shipdate] &amp;lt;&amp;gt; null then Date.AddDays([shipdate],[deliverytime]) else Date.AddDays([nextpickup],[deliverytime])&lt;/P&gt;&lt;P&gt;if [shipdate] = null then Date.AddDays([nextpickup],[deliverytime]) else Date.AddDays([shipdate],[deliverytime])&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have diffren questions which would help me to understand this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Is there any value which I could use in the ship date column to replace the null value without using a dummy date like 01.01.1970 and keep it blank?&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Does m-language support any fuction to work with this null value, which would allow me to have a working if-expression?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 20:49:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856315#M984536</guid>
      <dc:creator>Steffen1</dc:creator>
      <dc:date>2022-10-21T20:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Null Values in Date Column</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856401#M984562</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460264" data-lia-user-login="Steffen1" class="lia-mention lia-mention-user"&gt;Steffen1&lt;/a&gt;&amp;nbsp; - You could try changing the DAX to use the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NOT ( ISBLANK( [shipdate] ) )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the ISBLANK will return TRUE and NOT will swap this to FALSE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I just want to double check that the Date is empty.&amp;nbsp; It doesn't contain "Null".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;Daryl&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 22:26:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856401#M984562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-21T22:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Null Values in Date Column</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856436#M984569</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much for your quick reply and the tip to check if its really containing null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im not an expert but for me it looks like it does contain null?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dax could be an option but my preference would be within the power query/M, if possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 23:54:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856436#M984569</guid>
      <dc:creator>Steffen1</dc:creator>
      <dc:date>2022-10-21T23:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Null Values in Date Column</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856682#M984635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460264" data-lia-user-login="Steffen1" class="lia-mention lia-mention-user"&gt;Steffen1&lt;/a&gt;&amp;nbsp;- it looks like you need to change something in Power Query to allow the Dax to work.&amp;nbsp; If you see the following images, the left contains (blank).&amp;nbsp; This is the desired result in data model.&amp;nbsp; Contrast this with the right, which is populated with text string "(Null)"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This is how the (Blank) and "(Null)" text string appears in Power Query.&amp;nbsp; We need the result on the left.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I would suggest using "Replace Values" to turn the string (Null) to null.&amp;nbsp; keep the null in lowercase so Power Query recognises this as null instead of "Null" or "NULL".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also make sure that Data Type for the column is Date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;Daryl&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 08:24:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856682#M984635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-22T08:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Null Values in Date Column</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856838#M984670</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my data view it shows me as you said, the blank, which is the desired result but I wonder if there is a solution within the Power Query to deal with the null values via M-Language and not DAX?&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;Thank you very much for the support&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 12:10:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Null-Values-in-Date-Column/m-p/2856838#M984670</guid>
      <dc:creator>Steffen1</dc:creator>
      <dc:date>2022-10-22T12:10:23Z</dc:date>
    </item>
  </channel>
</rss>

