<?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 How to express this in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-in-DAX/m-p/2019568#M44968</link>
    <description>&lt;P&gt;I am trying to express this condition in DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table.ImmunizationDate &amp;gt; Table.ConsentDate&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;They are located in different row context (different row).&lt;/P&gt;&lt;P&gt;But, both have common which is Step = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, to distinguish two better,&lt;/P&gt;&lt;P&gt;ImmunizationDate has "Historical" as Consent&lt;/P&gt;&lt;P&gt;ConsentDate has "Refused" as Consent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 20:30:14 GMT</pubDate>
    <dc:creator>JustinDoh1</dc:creator>
    <dc:date>2021-08-16T20:30:14Z</dc:date>
    <item>
      <title>How to express this in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-in-DAX/m-p/2019568#M44968</link>
      <description>&lt;P&gt;I am trying to express this condition in DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table.ImmunizationDate &amp;gt; Table.ConsentDate&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;They are located in different row context (different row).&lt;/P&gt;&lt;P&gt;But, both have common which is Step = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, to distinguish two better,&lt;/P&gt;&lt;P&gt;ImmunizationDate has "Historical" as Consent&lt;/P&gt;&lt;P&gt;ConsentDate has "Refused" as Consent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 20:30:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-in-DAX/m-p/2019568#M44968</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-08-16T20:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to express this in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-in-DAX/m-p/2019587#M44970</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="296339" data-lia-user-login="JustinDoh1" class="lia-mention lia-mention-user"&gt;JustinDoh1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not really sure how the result should look like. I just guessed you want to return a 1 if&amp;nbsp;&lt;SPAN&gt;Table.ImmunizationDate &amp;gt; Table.ConsentDate and a 0 if not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try the following measure:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Immunization after Consent =
VAR vImmunization =
    CALCULATE(
        MAX( myTable[ImmunizationDate] ),
        ALLEXCEPT(
            myTable,
            myTable[Step]
        )
    )
VAR vConsent =
    CALCULATE(
        MAX( myTable[ConsentDate] ),
        ALLEXCEPT(
            myTable,
            myTable[Step]
        )
    )
RETURN
    IF(
        vImmunization &amp;gt; vConsent,
        1,
        0
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;Denis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Aug 2021 20:29:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-in-DAX/m-p/2019587#M44970</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-08-16T20:29:01Z</dc:date>
    </item>
  </channel>
</rss>

