<?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: IF Statement evaluating dates is probably working great, but not like I think it should in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3410229#M128891</link>
    <description>&lt;P&gt;Your date should be in quotation marks - try it out and let me know if it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 05:28:04 GMT</pubDate>
    <dc:creator>Marianna</dc:creator>
    <dc:date>2023-09-01T05:28:04Z</dc:date>
    <item>
      <title>IF Statement evaluating dates is probably working great, but not like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3409710#M128867</link>
      <description>&lt;P&gt;Here is some low-hanging fruit for someone...but would be a great help to end my frustration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pulling data in from an Oracle Database to Power BI.&amp;nbsp; I need to ignore a bug in our Oracle Application that will at times write in a date of 01/01/4019 in the data.&amp;nbsp; Went to Oracle to get this fixed and they told me they have it filtered out from the UI of the application, so I could go kick rocks, which is another reason why Oracle sucks.&amp;nbsp; Moving on, the Field format in Power BI is mm/dd/yyyy if that matters.&amp;nbsp; When that value appears in the Oracle data, I don't want it to appear in our reports in Power BI.&amp;nbsp; So, I created a new column and turned to my simple IF statement that will substitute null for any values of January 1, 4019 that may come in, and will write in the date correctly if it is in the next 1,996 years:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RevisedDate = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;('Activity Updates'[Date] = &lt;/SPAN&gt;&lt;SPAN&gt;01&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;01&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;4019&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;(), 'Activity Updates'[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It in essence returns a replica of the Date column, and doesn't seem to recognize 1/1/4019 as a date value no matter what format I enter the date in the IF statement.&amp;nbsp; Until they add the "read my mind please" functionality to Power BI, does anyone know what I have done wrong and why all resulting 1/1/4019 dates are still appearing in my handy "RevisedDate" column still rather than nulls?&amp;nbsp; Thanks in advance!&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Aug 2023 20:55:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3409710#M128867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-31T20:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement evaluating dates is probably working great, but not like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3410229#M128891</link>
      <description>&lt;P&gt;Your date should be in quotation marks - try it out and let me know if it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 05:28:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3410229#M128891</guid>
      <dc:creator>Marianna</dc:creator>
      <dc:date>2023-09-01T05:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement evaluating dates is probably working great, but not like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3410893#M128931</link>
      <description>&lt;P&gt;Thank you for your response Marianna!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is one of the reasons I am confused.&amp;nbsp; If I put single quotes around the date, Power BI thinks it is a table (understandable) and gives the error "Cannot find table '01/01/4019' ".&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If I put the 01/01/4019 in double quotes, it sees it as Text, and errors saying that it cannot compare text to date fields.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I did that, and have also tried different date formats (01-Jan-4019, 01-01-4019, etc.), and those don't seem to work.&amp;nbsp; Feels like this is such a fundamental problem that I am missing...it's a simple IF statement...but I'm stumped.&amp;nbsp; Again, thank you for your response!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Sep 2023 12:59:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3410893#M128931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-01T12:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement evaluating dates is probably working great, but not like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3411216#M128955</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, here you are:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RevisedDate =
IF (
    'Activity Updates'[Date] = DATE ( 4019, 01, 01 ),
    BLANK (),
    'Activity Updates'[Date]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 01 Sep 2023 15:37:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3411216#M128955</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-01T15:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement evaluating dates is probably working great, but not like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3411230#M128956</link>
      <description>&lt;P&gt;ERD,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!&amp;nbsp; That fixed it!&amp;nbsp; I had tried using the DATE and DATESBETWEEN statements, but I know my syntax was much different trying to get it to work.&amp;nbsp; Much appreciated!!!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 15:49:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-evaluating-dates-is-probably-working-great-but-not/m-p/3411230#M128956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-01T15:49:26Z</dc:date>
    </item>
  </channel>
</rss>

