<?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 Repeating &amp;quot;Key&amp;quot; column value in Calculated Table when merging two columns from Source Table into one in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Repeating-quot-Key-quot-column-value-in-Calculated-Table-when/m-p/2215934#M52456</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a new calculated table based on another table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ASINs" and "SKUs" columns from source table would be combined into a single "ASINs &amp;amp; SKUs" column of the calculated table (distinct values and excluding blanks from both "ASINs" and "SKUs" source columns), while repeating the respective "Key" column. Other columns (Data 1, 2, 3..) would be ignored.&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;&lt;P&gt;I have tried the following, but the expression didn't work claiming "A table of multiple values was supplied where a single value was expected."&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calculated Table = SELECTCOLUMNS(Source Table, "Key", Source Table[Key], "ASINs &amp;amp; SKUs", UNION(VALUES(Source Table[ASIN]), VALUES(Source Table[SKU])))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 10:11:40 GMT</pubDate>
    <dc:creator>devitus</dc:creator>
    <dc:date>2021-12-01T10:11:40Z</dc:date>
    <item>
      <title>Repeating "Key" column value in Calculated Table when merging two columns from Source Table into one</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Repeating-quot-Key-quot-column-value-in-Calculated-Table-when/m-p/2215934#M52456</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a new calculated table based on another table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ASINs" and "SKUs" columns from source table would be combined into a single "ASINs &amp;amp; SKUs" column of the calculated table (distinct values and excluding blanks from both "ASINs" and "SKUs" source columns), while repeating the respective "Key" column. Other columns (Data 1, 2, 3..) would be ignored.&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;&lt;P&gt;I have tried the following, but the expression didn't work claiming "A table of multiple values was supplied where a single value was expected."&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calculated Table = SELECTCOLUMNS(Source Table, "Key", Source Table[Key], "ASINs &amp;amp; SKUs", UNION(VALUES(Source Table[ASIN]), VALUES(Source Table[SKU])))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 10:11:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Repeating-quot-Key-quot-column-value-in-Calculated-Table-when/m-p/2215934#M52456</guid>
      <dc:creator>devitus</dc:creator>
      <dc:date>2021-12-01T10:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating "Key" column value in Calculated Table when merging two columns from Source Table into one</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Repeating-quot-Key-quot-column-value-in-Calculated-Table-when/m-p/2216102#M52462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313527" data-lia-user-login="devitus" class="lia-mention lia-mention-user"&gt;devitus&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The UNION function needs you to supply the whole table, not just a particular column&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR _Unioned = 
UNION(
    SELECTCOLUMNS(
        FILTER('Table', NOT ISBLANK('Table'[ASINs])), 
        "Key", 'Table'[Key], "ASINS &amp;amp; SKUs", 'Table'[ASINs]
        ),
    SELECTCOLUMNS(
        FILTER('Table', NOT ISBLANK('Table'[SKUs])), 
        "Key", 'Table'[Key], "ASINS &amp;amp; SKUs", 'Table'[SKUs])
)
VAR _Distinct = 
SUMMARIZE(
    _Unioned,
    [Key], [ASINS &amp;amp; SKUs]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 12:51:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Repeating-quot-Key-quot-column-value-in-Calculated-Table-when/m-p/2216102#M52462</guid>
      <dc:creator>PaulOlding</dc:creator>
      <dc:date>2021-12-01T12:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating "Key" column value in Calculated Table when merging two columns from Source Table into one</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Repeating-quot-Key-quot-column-value-in-Calculated-Table-when/m-p/2216147#M52467</link>
      <description>&lt;P&gt;Absolutely amazing, thanks so much &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="150936" data-lia-user-login="PaulOlding" class="lia-mention lia-mention-user"&gt;PaulOlding&lt;/a&gt;! Worked perfectly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 13:11:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Repeating-quot-Key-quot-column-value-in-Calculated-Table-when/m-p/2216147#M52467</guid>
      <dc:creator>devitus</dc:creator>
      <dc:date>2021-12-01T13:11:49Z</dc:date>
    </item>
  </channel>
</rss>

