<?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 Can a Lookupvalue value itself? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3180769#M114986</link>
    <description>&lt;P&gt;I have a list of user roles in the &lt;STRONG&gt;Role&lt;/STRONG&gt; column in Table A, unfortunately that column has a mix of the names of the Role Groups and the different roles in the groups. i.e that column contains Accounting (role group), AP Clerk, AR Clerk (individual roles). I need a column in this table that is all Role Groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a seperate table Table B - I have the Group, Role and abbreviation separted out, like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I started with adding a new column like this.&lt;/P&gt;&lt;P&gt;new column = LOOKUPVALUE('Table B [Group], 'Table B [Role Name], 'Table A' [Role] ???&lt;/P&gt;&lt;P&gt;However I need the value in the new column to remain the Table A [Role] value if it doesn't match the criteria in the lookupvalue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I do that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, learning DAX. Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2023 02:10:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-04-11T02:10:36Z</dc:date>
    <item>
      <title>Can a Lookupvalue value itself?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3180769#M114986</link>
      <description>&lt;P&gt;I have a list of user roles in the &lt;STRONG&gt;Role&lt;/STRONG&gt; column in Table A, unfortunately that column has a mix of the names of the Role Groups and the different roles in the groups. i.e that column contains Accounting (role group), AP Clerk, AR Clerk (individual roles). I need a column in this table that is all Role Groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a seperate table Table B - I have the Group, Role and abbreviation separted out, like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I started with adding a new column like this.&lt;/P&gt;&lt;P&gt;new column = LOOKUPVALUE('Table B [Group], 'Table B [Role Name], 'Table A' [Role] ???&lt;/P&gt;&lt;P&gt;However I need the value in the new column to remain the Table A [Role] value if it doesn't match the criteria in the lookupvalue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I do that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, learning DAX. Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 02:10:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3180769#M114986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-11T02:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can a Lookupvalue value itself?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3181054#M114998</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , try earlier &lt;/P&gt;
&lt;P&gt;Power BI DAX- Earlier, I should have known Earlier: &lt;A href="https://youtu.be/CVW6YwvHHi8" target="_blank"&gt;https://youtu.be/CVW6YwvHHi8&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=cN8AO3_vmlY&amp;amp;t=17820s" target="_blank"&gt;https://www.youtube.com/watch?v=cN8AO3_vmlY&amp;amp;t=17820s&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maxx(filter('Table B', 'Table B [Role Name]=&amp;nbsp; 'Table A' [Role]), 'Table B'[Group] )&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 05:55:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3181054#M114998</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-04-11T05:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can a Lookupvalue value itself?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3181743#M115053</link>
      <description>&lt;P&gt;Thanks for the suggestion but that gave me the same result as the lookupvalue I tried. The cells that already have the group name come back blank. I need the cells with the group name to come back with the same group name that they have.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 12:10:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3181743#M115053</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-11T12:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can a Lookupvalue value itself?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3193132#M115851</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;I suggest you to try code as below to create a calculated column in Table A.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Group =
VAR _GROUPLIST =
    VALUES ( 'Table B'[Group] )
VAR _GROUP =
    CALCULATE (
        MAX ( 'Table B'[Group] ),
        FILTER ( 'Table B', 'Table B'[Role Name] = EARLIER ( 'Table A'[Role] ) )
    )
RETURN
    IF ( 'Table A'[Role] IN _GROUPLIST, 'Table A'[Role], _GROUP )&lt;/LI-CODE&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>Tue, 18 Apr 2023 08:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-a-Lookupvalue-value-itself/m-p/3193132#M115851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-18T08:57:31Z</dc:date>
    </item>
  </channel>
</rss>

