<?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 columns error in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3809505#M148959</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="717428" data-lia-user-login="Necrosis1968" class="lia-mention lia-mention-user"&gt;Necrosis1968&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your statement, I think your error may be caused that you use&amp;nbsp;&lt;SPAN&gt;'report this month'&lt;/SPAN&gt;&lt;SPAN&gt;[Unique ID] directly in your code to create the calculated column.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This error occurs because Power BI is unable to determine which row of data to use in a calculation among multiple rows of data.&lt;/P&gt;
&lt;P&gt;Here I create a sample and I can reproduce your issue.&lt;/P&gt;
&lt;P&gt;Last Month:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This Month:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I suggest you to try code as below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Resolved = IF ('report last month'[Unique ID] in  VALUES('report this month'[Unique ID]), "No", "Yes")&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2024 06:42:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-04T06:42:55Z</dc:date>
    <item>
      <title>Comparing columns error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3808272#M148888</link>
      <description>&lt;P&gt;Hi, sorry first time here and a PowerBI newbie.&lt;/P&gt;&lt;P&gt;I want to compare 2 columns, from different tables in PowerBI. They are joined by Unique-ID. I have tried the following:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Resolved =&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'report last month'&lt;/SPAN&gt;&lt;SPAN&gt;[Unique ID]&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'report this month'&lt;/SPAN&gt;&lt;SPAN&gt;[Unique ID]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"No"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Yes"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So basically, if it's in last month's report but not in this one then resolved=No for that row, else it will be Yes. If it's not disappeared from the report it's not resolved.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Problem is I'm getting an error "A single value for column 'Unique ID' in table 'report this month' cannot be determined."&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;They are both String variable types.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I did try using MAX function but it sets every row in the resolved column as "Yes". I also tried MIN, but that sets all bar one as "Yes"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help appreciated.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Apr 2024 15:42:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3808272#M148888</guid>
      <dc:creator>Necrosis1968</dc:creator>
      <dc:date>2024-04-03T15:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing columns error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3808312#M148891</link>
      <description>&lt;P&gt;You have written a measure (which requires an aggregation). Are the 2 different tables related? This is what powerbi uses to work out the measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 16:08:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3808312#M148891</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2024-04-03T16:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing columns error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3809505#M148959</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="717428" data-lia-user-login="Necrosis1968" class="lia-mention lia-mention-user"&gt;Necrosis1968&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your statement, I think your error may be caused that you use&amp;nbsp;&lt;SPAN&gt;'report this month'&lt;/SPAN&gt;&lt;SPAN&gt;[Unique ID] directly in your code to create the calculated column.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This error occurs because Power BI is unable to determine which row of data to use in a calculation among multiple rows of data.&lt;/P&gt;
&lt;P&gt;Here I create a sample and I can reproduce your issue.&lt;/P&gt;
&lt;P&gt;Last Month:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This Month:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I suggest you to try code as below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Resolved = IF ('report last month'[Unique ID] in  VALUES('report this month'[Unique ID]), "No", "Yes")&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 06:42:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3809505#M148959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-04T06:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing columns error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3809803#M149004</link>
      <description>&lt;P&gt;That worked! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 07:45:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparing-columns-error/m-p/3809803#M149004</guid>
      <dc:creator>Necrosis1968</dc:creator>
      <dc:date>2024-04-04T07:45:42Z</dc:date>
    </item>
  </channel>
</rss>

