<?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 formula to compare 2 rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221293#M19820</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Maxx will work for String. Do you want sum up value to check?'if it have only numeric that you can try [Value]*1&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jul 2020 11:39:17 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-07-14T11:39:17Z</dc:date>
    <item>
      <title>DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1220916#M19808</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table like the below and want to setup a calculated column with DAX to check whether each key from the "Concat" column has a value or not.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;- po1drop1 has 2 rows, with 1 row has Value=100, so I want the Result=Yes&lt;/P&gt;&lt;P&gt;- podrop2 has 1 row only with blank value, so I want the Result=No&lt;/P&gt;&lt;P&gt;- podrop3 has&amp;nbsp;2 rows, with 1 row has Value=100, so I want the Result=Yes&lt;/P&gt;&lt;P&gt;- podrop4 has&amp;nbsp;2 rows, with 1 row has Value=100, so I want the Result=Yes&lt;/P&gt;&lt;P&gt;-&amp;nbsp;podrop5 has 1 row only with blank value, so I want the Result=No&lt;/P&gt;&lt;P&gt;-&amp;nbsp;podrop6 has 1 row only with blank value, so I want the Result=No&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;Not sure how to put the FILTER or EARLIER function in place in order to achieve the desired result.&lt;/P&gt;&lt;P&gt;Can anyone assist? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Emily&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:36:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1220916#M19808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-14T11:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1220969#M19809</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try a new column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(sumx(filter(table,[concat]=earlier([concat])),[Value])=100 ,"Yes","No") &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(maxx(filter(table,[concat]=earlier([concat])),[Value])=100 ,"Yes","No")&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 09:55:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1220969#M19809</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-07-14T09:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221042#M19811</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a calculated column using DAX as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;IfExists = var cnt = CALCULATE(DISTINCTCOUNTNOBLANK(Category[Value]), FILTER(Category, Category[Category] = EARLIER(Category[Category]))) return IF(cnt &amp;gt; 0, "Yes", "No")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It will give you following result:&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;In the above DAX, just use columns from your original data. I did this on a test data at my end.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Pragati&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Jul 2020 10:13:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221042#M19811</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-07-14T10:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221180#M19813</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81077" data-lia-user-login="Pragati11" class="lia-mention lia-mention-user"&gt;Pragati11&lt;/a&gt;&amp;nbsp; Thanks, I just tested your result in my file but I got the entire column with "Yes".....not sure if I did something wrong in the formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Emily&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:01:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221180#M19813</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-14T11:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221191#M19814</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;Thanks for your proposed solution and both formulas working well. Have a great day!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Emily&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:04:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221191#M19814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-14T11:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221194#M19815</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;What's the datatype of your "VALUE" column? Is it wholenumber or text?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pragati&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:04:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221194#M19815</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-07-14T11:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221197#M19816</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81077" data-lia-user-login="Pragati11" class="lia-mention lia-mention-user"&gt;Pragati11&lt;/a&gt;&amp;nbsp; VALUE column is a STRING data type and some rows with blank data.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:32:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221197#M19816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-14T11:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221276#M19817</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry that I found out your proposed solution is not 100% working in my real enviroment, because the Value column is a string type rather than numerical type so I can't use SUMX or MAXX fuction.&lt;/P&gt;&lt;P&gt;Any other way to get the same result in considering the Value column is a string?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Emily&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:31:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221276#M19817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-14T11:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221293#M19820</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , Maxx will work for String. Do you want sum up value to check?'if it have only numeric that you can try [Value]*1&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:39:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221293#M19820</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-07-14T11:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221294#M19821</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;Not sure why it is not working at your end.&lt;/P&gt;&lt;P&gt;I have tried the same formula when VALUE column is a string or numeric, it works for me.&lt;/P&gt;&lt;P&gt;Can you check again as the DISTINCTCOUNTNOBLANK will work both for String and numeric columns?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pragati&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:41:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221294#M19821</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-07-14T11:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221328#M19823</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81077" data-lia-user-login="Pragati11" class="lia-mention lia-mention-user"&gt;Pragati11&lt;/a&gt;&amp;nbsp;Would you mind to share your PBIX file with the solution so that I can test it from my end? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Emily&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:51:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221328#M19823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-14T11:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221344#M19824</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;There you go:&lt;/P&gt;&lt;P&gt;&lt;A href="https://wetransfer.com/downloads/89da4806f8d3ab1ed2d37ad8b9abe26f20200714115411/08df214f8f1e1c720aa851341fe122ee20200714115431/e8f193" target="_blank"&gt;&lt;SPAN&gt;https://wetransfer.com/downloads/89da4806f8d3ab1ed2d37ad8b9abe26f20200714115411/08df214f8f1e1c720aa851341fe122ee20200714115431/e8f193&lt;/SPAN&gt; &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pragati&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:55:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1221344#M19824</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-07-14T11:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1223040#M19870</link>
      <description>&lt;P&gt;The proposed solution is working fine now, thank you very much!&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81077" data-lia-user-login="Pragati11" class="lia-mention lia-mention-user"&gt;Pragati11&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Emily&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 02:06:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1223040#M19870</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-15T02:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to compare 2 rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1223896#M19894</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;Glad that the solutions works for you.&lt;/P&gt;&lt;P&gt;Can you accept it as a solution so that others can refer it later?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pragati&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 08:00:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-compare-2-rows/m-p/1223896#M19894</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-07-15T08:00:52Z</dc:date>
    </item>
  </channel>
</rss>

