<?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: New Column for Matching Column 2 to Column 1 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3754121#M146461</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;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81111" data-lia-user-login="HotChilli" class="lia-mention lia-mention-user"&gt;HotChilli&lt;/a&gt;&amp;nbsp; for the quick response and solution. Here are some of my additions:&lt;BR /&gt;According to your first description, you can create such a calculated column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 1 = 
var _a=COUNTAX(FILTER('Table','Table'[project id]=EARLIER('Table'[project id]) &amp;amp;&amp;amp; 'Table'[print status]="canceled"),[project id])
RETURN IF(_a&amp;gt;0,"canceled",[print status])&lt;/LI-CODE&gt;
&lt;P&gt;Based on your second description, you can create a calculated column like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 2 = 
 var _a=COUNTAX(FILTER('Table','Table'[project id]=EARLIER('Table'[project id]) &amp;amp;&amp;amp; 'Table'[print status]="canceled"),[project id])
RETURN IF(_a=BLANK(),BLANK(),[print status])&lt;/LI-CODE&gt;
&lt;P&gt;Then the result is as follows.&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;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2024 06:30:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-11T06:30:45Z</dc:date>
    <item>
      <title>New Column for Matching Column 2 to Column 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3751985#M146337</link>
      <description>&lt;P&gt;Column 1 (Project ID) contains repeating values.&lt;/P&gt;&lt;P&gt;Column 2 contains a series of values, maximum of 1 of each per project ID (column 1).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add a new column that adds value of "Canceled" whenever column 2 contains "Canceled", but to mark that for all rows where Project ID matches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example from screenshot below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Project ID:&lt;/STRONG&gt; 64f1de08076108cf4638f61b4def8bdb&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Print Statuses:&lt;/STRONG&gt; Sent to print, Not submitted, Printing, Shipped, Canceled&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since this Project ID has Print Status of "canceled", I want to mark all rows with&amp;nbsp;64f1de08076108cf4638f61b4def8bdb as "Canceled" in a new column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Project ID:&amp;nbsp;&lt;/STRONG&gt;64f9d23a01d07f63c698ec40de8e9f51 does NOT have the print status of "canceled", so the new column would be blank for all rows of this Project ID.&amp;nbsp;&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>Fri, 08 Mar 2024 18:58:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3751985#M146337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-08T18:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: New Column for Matching Column 2 to Column 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3752202#M146351</link>
      <description>&lt;P&gt;Please provide sample data &lt;STRONG&gt;in usable format (not as a screenshot)&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 23:15:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3752202#M146351</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-08T23:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: New Column for Matching Column 2 to Column 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3752204#M146352</link>
      <description>&lt;P&gt;Create a calculated column.&lt;/P&gt;
&lt;P&gt;Count the rows which have the same projectID as the current row with Print Status = "Canceled"&lt;/P&gt;
&lt;P&gt;, for example,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var _Pid = theTable[Project ID]
var _CanceledRow = COUNTROWS(FILTER(theTable, theTable[Project ID] = _Pid &amp;amp;&amp;amp; theTable[Print Status] = "Canceled"))&lt;/LI-CODE&gt;
&lt;P&gt;this should put 0 or 1 in _CanceledRow.&lt;/P&gt;
&lt;P&gt;Write an IF statement that tests the value of _CanceledRow.&amp;nbsp; If greater than 0 then "Canceled"&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 23:16:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3752204#M146352</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2024-03-08T23:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: New Column for Matching Column 2 to Column 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3754121#M146461</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;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81111" data-lia-user-login="HotChilli" class="lia-mention lia-mention-user"&gt;HotChilli&lt;/a&gt;&amp;nbsp; for the quick response and solution. Here are some of my additions:&lt;BR /&gt;According to your first description, you can create such a calculated column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 1 = 
var _a=COUNTAX(FILTER('Table','Table'[project id]=EARLIER('Table'[project id]) &amp;amp;&amp;amp; 'Table'[print status]="canceled"),[project id])
RETURN IF(_a&amp;gt;0,"canceled",[print status])&lt;/LI-CODE&gt;
&lt;P&gt;Based on your second description, you can create a calculated column like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 2 = 
 var _a=COUNTAX(FILTER('Table','Table'[project id]=EARLIER('Table'[project id]) &amp;amp;&amp;amp; 'Table'[print status]="canceled"),[project id])
RETURN IF(_a=BLANK(),BLANK(),[print status])&lt;/LI-CODE&gt;
&lt;P&gt;Then the result is as follows.&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;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 06:30:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3754121#M146461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-11T06:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: New Column for Matching Column 2 to Column 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3755570#M146522</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;Anonymous&lt;/a&gt;! Your column 1 calculation works great! This will get me where I need to go.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 14:34:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-for-Matching-Column-2-to-Column-1/m-p/3755570#M146522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-11T14:34:35Z</dc:date>
    </item>
  </channel>
</rss>

