<?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: Custom column in New Table by looking up the values from existing Table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3853321#M150548</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; Thank you very much for investing time to investigate it. As mentioned above, the third column must say if it ‘assigned role’ or ‘unassigned’ role to that particular ID refering at the ‘Table A’. As Table ‘A’ has ID column and Roles column but all the roles are not assigned to all the ID’s. So now looking at the values in Table A, in the Result Table we need ‘Assigned’ or ‘Not Assigned’ as Third column. Which means if each role is assigned to all Id’s then the entry for that role and Id (row) must be “Assigned” else “Not Assigned”. I think calculated column will not support to compare values from other table?&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2024 10:09:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-19T10:09:53Z</dc:date>
    <item>
      <title>Custom column in New Table by looking up the values from existing Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3850862#M150471</link>
      <description>&lt;P&gt;Hi , I&amp;nbsp; have some roles in ‘Table A’ with ID’s. Now each ID must have all the roles assigned but some Id’s are not assigned with certain roles, which means there are some missing roles for each ID. We have ID and Roles in one Table and ‘ID’ with other details in another Table. Relationship is created these both Tables and columns from both tables are implemented on visuals. Requirement is a table which displays the ID column, Roles column and Role Assigned to ID/Role NOT Assigned to ID&lt;BR /&gt;&lt;BR /&gt;So to get this working, I have applied a measure&lt;BR /&gt;&lt;BR /&gt;Assigned Status =&lt;/P&gt;&lt;P&gt;&amp;nbsp; VAR Selected_Role = SELECTEDVALUE('Table A'[Roles])&lt;/P&gt;&lt;P&gt;&amp;nbsp; VAR Selected_ID = SELECTEDVALUE(‘Table B’ [id])&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;IF(Selected_Role = Selected_ID, "Not Assigned", "Assigned")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Above measure gives us the details of ‘Assigned’ or ‘Not Assigned’ status for each ID but We also have a slicer of Email with search option when a user selects a option from the ‘email’ slicer, all the ID’s are retrieved &amp;nbsp;where only one row with assigned and all other rows as unassigned but we want ‘Assigned Status’ measure column must show up only ‘Assigned’ rows when user selects options from ‘Email’ slicer but show up all the values (as above measure) when other slicers are selected.&lt;BR /&gt;&lt;BR /&gt;As the measure limits the implementations, Is there any way to create a new Table with two columns with all &amp;nbsp;‘ID’ and &amp;nbsp;all ’Roles’( each id should have all the roles). Where we can get the assigned and Unassigned status as a third column? Just for information we have 60 ID’s and 45 roles, so number of rows for each ID must be 45. If the Assigned status is in a column instead of measure column it would be useful in further implementations.&lt;BR /&gt;&lt;BR /&gt;Just for example : If 1,2,3 are Id’s and A, B, C,D, E are roles then The New table must look link&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 18:41:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3850862#M150471</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-18T18:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom column in New Table by looking up the values from existing Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3851412#M150496</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you want a table, each ID in this table corresponds to a role.60 IDs and 45 roles, you need to generate a table with 60*45 rows according to your meaning. I used the following sample data:&lt;/P&gt;
&lt;P&gt;table A:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;table B:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I use the following DAX expression to generate a calculated table where each ID corresponds to a role:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Result table =
VAR _roles =
    SUMMARIZE ( 'Table A', 'Table A'[Role] )
VAR _ID =
    SUMMARIZE ( 'Table B', 'Table B'[ID] )
RETURN
    CROSSJOIN ( _ID, _roles )&lt;/LI-CODE&gt;
&lt;P&gt;Here are the results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This way, each ID will correspond to a role. If you want to add a third column to this table, you just need to create a new calculated column in this table according to your calculation logic.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I've provided the PBIX used this time below .&amp;nbsp;If you are not familiar with CROSSJOIN and SUMMARIZE function, you can click on the link below to learn how to use the summary&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/crossjoin-function-dax" target="_blank"&gt;CROSSJOIN function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/summarize-function-dax" target="_blank"&gt;SUMMARIZE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-jianpengli%40microsoft.com%7Cd9552f18a0c94a7564f308dc188bf35e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638412236574903368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=3jxUE%2BTNC8dS4DIhPphEB3NA%2BK94pwURGHu%2BXC4eezw%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Jianpeng Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 02:19:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3851412#M150496</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-19T02:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom column in New Table by looking up the values from existing Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3853321#M150548</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; Thank you very much for investing time to investigate it. As mentioned above, the third column must say if it ‘assigned role’ or ‘unassigned’ role to that particular ID refering at the ‘Table A’. As Table ‘A’ has ID column and Roles column but all the roles are not assigned to all the ID’s. So now looking at the values in Table A, in the Result Table we need ‘Assigned’ or ‘Not Assigned’ as Third column. Which means if each role is assigned to all Id’s then the entry for that role and Id (row) must be “Assigned” else “Not Assigned”. I think calculated column will not support to compare values from other table?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 10:09:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3853321#M150548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-19T10:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom column in New Table by looking up the values from existing Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3857279#M150687</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your reply. You can use the following DAX expression to get the status of whether the ID is assigned in Table A, and then use the IF function to determine whether the current ID is assigned:&lt;/P&gt;
&lt;P&gt;table A:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR _status = CALCULATE(MAX('Table A'[Column]),FILTER('Table A','Table A'[ID]='Result table'[ID]))
RETURN IF(_status="assign","assign","unassign")&lt;/LI-CODE&gt;
&lt;P&gt;Here are the results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-jianpengli%40microsoft.com%7Cd9552f18a0c94a7564f308dc188bf35e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638412236574903368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=3jxUE%2BTNC8dS4DIhPphEB3NA%2BK94pwURGHu%2BXC4eezw%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Jianpeng Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 01:29:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3857279#M150687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-22T01:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom column in New Table by looking up the values from existing Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3865353#M150996</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 12:03:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Custom-column-in-New-Table-by-looking-up-the-values-from/m-p/3865353#M150996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-24T12:03:37Z</dc:date>
    </item>
  </channel>
</rss>

