<?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: Comparing Two Date Column it's return wrong value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117341#M16375</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Apart from the solution mentioned, you can try this too.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Yesterday = IF (DATEDIFF(Table[Request Closed Date],Today(),DAY) = 1,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Today= IF (DATEDIFF(Table[Request Closed Date],Today(),DAY) = 0,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;Regards,&lt;BR /&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 25 May 2020 08:21:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-25T08:21:59Z</dc:date>
    <item>
      <title>Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117180#M16369</link>
      <description>&lt;P&gt;i have using below Dax formula&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;today = IF(VALUE(TODAY()) == test[Request Closed Date] ,"1","0")&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;yesterday = IF(VALUE(TODAY()-1) == test[Request Closed Date],"1","0")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;both condition i have tried but it's return wrong value&amp;nbsp; &amp;nbsp; can you pls guide me&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 06:59:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117180#M16369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-25T06:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117236#M16371</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this calculated column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Today = IF(TODAY()=testTable[Request Closed Date],1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;Yesterday = IF(TODAY()-1=testTable[Request Closed Date],1,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, make sure the &lt;STRONG&gt;Requested Closed Date&amp;nbsp;&lt;/STRONG&gt;column type as Date&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is my latest blog&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Dynamic-Page-Navigation-Based-on-User-Login/ba-p/1097786" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/Community-Blog/Dynamic-Page-Navigation-Based-on-User-Login/ba-p/1097786&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 07:17:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117236#M16371</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-05-25T07:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117288#M16372</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="32333" data-lia-user-login="nandukrishnavs" class="lia-mention lia-mention-user"&gt;nandukrishnavs&lt;/a&gt;&amp;nbsp; &amp;nbsp; i have tried but same value i'm getting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 07:47:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117288#M16372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-25T07:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117293#M16373</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; Make sure the column type is &lt;STRONG&gt;Date.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to replicate your scenario.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Below is the PowerQuery for the sample table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjLVNTDVNTIwMlCK1QFyTVC5+GWNUblGCG4sAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Request Closed Date" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Request Closed Date", type datetime}})
in
    #"Changed Type"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculated columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Today = IF(TODAY()=testTable[Request Closed Date],1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;Yesterday = IF(TODAY()-1=testTable[Request Closed Date],1,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Alternatively&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Yesterday=
IF (
    TODAY ()-1
        = DATE ( YEAR ( testTable[Request Closed Date] ), MONTH ( testTable[Request Closed Date] ), DAY ( testTable[Request Closed Date] ) ),
    1,
    0
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;Today =
IF (
    TODAY ()
        = DATE ( YEAR ( testTable[Request Closed Date] ), MONTH ( testTable[Request Closed Date] ), DAY ( testTable[Request Closed Date] ) ),
    1,
    0
)&lt;/LI-CODE&gt;&lt;P&gt;It is working for me.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 08:29:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117293#M16373</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-05-25T08:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117341#M16375</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Apart from the solution mentioned, you can try this too.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Yesterday = IF (DATEDIFF(Table[Request Closed Date],Today(),DAY) = 1,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Today= IF (DATEDIFF(Table[Request Closed Date],Today(),DAY) = 0,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;Regards,&lt;BR /&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 May 2020 08:21:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117341#M16375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-25T08:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117344#M16376</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="32333" data-lia-user-login="nandukrishnavs" class="lia-mention lia-mention-user"&gt;nandukrishnavs&lt;/a&gt;&amp;nbsp; &amp;nbsp; yes it's&amp;nbsp; &amp;nbsp;Date Format&amp;nbsp; &amp;nbsp;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;</description>
      <pubDate>Mon, 25 May 2020 08:22:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117344#M16376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-25T08:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117374#M16377</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Yesterday=
IF (
    TODAY ()-1
        = DATE ( YEAR ( testTable[Request Closed Date] ), MONTH ( testTable[Request Closed Date] ), DAY ( testTable[Request Closed Date] ) ),
    1,
    0
)&lt;/PRE&gt;&lt;PRE&gt;Today =
IF (
    TODAY ()
        = DATE ( YEAR ( testTable[Request Closed Date] ), MONTH ( testTable[Request Closed Date] ), DAY ( testTable[Request Closed Date] ) ),
    1,
    0
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this working?&lt;/P&gt;&lt;P&gt;Also, I have updated my previous post with the sample dataset, see if it is working or not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 08:33:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117374#M16377</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-05-25T08:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Date Column it's return wrong value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117546#M16379</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="32333" data-lia-user-login="nandukrishnavs" class="lia-mention lia-mention-user"&gt;nandukrishnavs&lt;/a&gt;&amp;nbsp; Thanks for Sharing it's Working Perfect&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 09:45:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-Two-Date-Column-it-s-return-wrong-value/m-p/1117546#M16379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-25T09:45:36Z</dc:date>
    </item>
  </channel>
</rss>

