<?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 Based on Value from Two Existing Columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4400244#M174691</link>
    <description>&lt;P&gt;Thank you, that worked perfect.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2025 14:26:11 GMT</pubDate>
    <dc:creator>kayjenki</dc:creator>
    <dc:date>2025-02-07T14:26:11Z</dc:date>
    <item>
      <title>New Column Based on Value from Two Existing Columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4398717#M174659</link>
      <description>&lt;P&gt;I am trying to create a new column that takes into consideration values from two existing columns, the first column is a unique ID that is repeated multiple times and the second column is either a Yes or No value associated to the unique ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the new column to state "Yes" if a yes (column B) exist at any point for the rows associated to the unique ID (column A) and "No" if there are not any rows associated to the unique ID that state yes. Below is an example, I was having a hard time articulating this, hopefully, it makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Unique ID&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAAA1234&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/TD&gt;&lt;/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lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCCC1234&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCCC1234&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 06 Feb 2025 18:51:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4398717#M174659</guid>
      <dc:creator>kayjenki</dc:creator>
      <dc:date>2025-02-06T18:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: New Column Based on Value from Two Existing Columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4398838#M174662</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="926087" data-lia-user-login="kayjenki" class="lia-mention lia-mention-user"&gt;kayjenki&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for providing sample data.&lt;/P&gt;
&lt;P&gt;To achieve the desired result, you can use the following formula to create a calculated column:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Column - Calculated =
VAR _id = 'Table'[Unique ID]
VAR _values =
    DISTINCT (
        SELECTCOLUMNS (
            FILTER (
                ALL ( 'Table' ),
                'Table'[Unique ID] = _id
            ),
            [Value]
        )
    )
VAR _containsYesCount =
    COUNTROWS (
        FILTER (_values, CONTAINSSTRING ([Value], "Yes"))
    )
RETURN
    IF (_containsYesCount = 1, "Yes", "No")&lt;/LI-CODE&gt;
&lt;P&gt;Below is the screenshot of the result, allowing you to effortlessly compare the expected outcomes with the calculated ones:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am also attachig the Power BI for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Udit&lt;BR /&gt;&lt;BR /&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;Accepting it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Appreciate your Kudo &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; Let's Connect: &lt;A href="https://www.linkedin.com/in/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkedIn&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://www.youtube.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;YouTube&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://medium.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Medium&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://github.com/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;GitHub&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":sparkles:"&gt;✨&lt;/span&gt; Visit My Linktree: &lt;A href="https://linktr.ee/quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkTree&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Proud to be a SuperUser&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 20:28:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4398838#M174662</guid>
      <dc:creator>quantumudit</dc:creator>
      <dc:date>2025-02-06T20:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: New Column Based on Value from Two Existing Columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4400244#M174691</link>
      <description>&lt;P&gt;Thank you, that worked perfect.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 14:26:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4400244#M174691</guid>
      <dc:creator>kayjenki</dc:creator>
      <dc:date>2025-02-07T14:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: New Column Based on Value from Two Existing Columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4400603#M174700</link>
      <description>&lt;P&gt;Happy to help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 20:28:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Column-Based-on-Value-from-Two-Existing-Columns/m-p/4400603#M174700</guid>
      <dc:creator>quantumudit</dc:creator>
      <dc:date>2025-02-07T20:28:45Z</dc:date>
    </item>
  </channel>
</rss>

