<?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: Merge Table Columns - Chnaging from a WIDE format to a LONG data format in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Merge-Table-Columns-Chnaging-from-a-WIDE-format-to-a-LONG-data/m-p/2208418#M52061</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="310373" data-lia-user-login="HLST" class="lia-mention lia-mention-user"&gt;HLST&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you first Unpivot the Green columns of your table in the Power Query?&lt;/P&gt;&lt;P&gt;&lt;A href="https://radacad.com/pivot-and-unpivot-with-power-bi" target="_blank"&gt;https://radacad.com/pivot-and-unpivot-with-power-bi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221c7098" target="_blank"&gt;https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221c7098&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can add some custom column and achive that output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Nov 2021 00:07:20 GMT</pubDate>
    <dc:creator>VahidDM</dc:creator>
    <dc:date>2021-11-26T00:07:20Z</dc:date>
    <item>
      <title>Merge Table Columns - Chnaging from a WIDE format to a LONG data format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Merge-Table-Columns-Chnaging-from-a-WIDE-format-to-a-LONG-data/m-p/2208413#M52060</link>
      <description>&lt;P&gt;## IMAGES REMOVED&lt;/P&gt;&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to produce a clustered bar chart with product type on the x-axis. My data is in the format displayed in the attached image. I would like to create a new table in BI where I have COL.1 - Time, COL.2 - Product type, COL.3 - Units sold, COL.4 - Jurisdiction. To do so, I need to merge all product columns into a single column creating many more rows to express sales of products in each month by respective region. I have attached a screenshot to illustrate what I am looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To put it simply, my data exists in WIDE format which limits me from presenting certain variables without printing x number of graphs. I would like to transform my WIDE data into a LONG format so my data is compatible with all plot types.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp;&lt;/SPAN&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;</description>
      <pubDate>Sun, 05 Dec 2021 23:58:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Merge-Table-Columns-Chnaging-from-a-WIDE-format-to-a-LONG-data/m-p/2208413#M52060</guid>
      <dc:creator>HLST</dc:creator>
      <dc:date>2021-12-05T23:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Table Columns - Chnaging from a WIDE format to a LONG data format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Merge-Table-Columns-Chnaging-from-a-WIDE-format-to-a-LONG-data/m-p/2208418#M52061</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="310373" data-lia-user-login="HLST" class="lia-mention lia-mention-user"&gt;HLST&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you first Unpivot the Green columns of your table in the Power Query?&lt;/P&gt;&lt;P&gt;&lt;A href="https://radacad.com/pivot-and-unpivot-with-power-bi" target="_blank"&gt;https://radacad.com/pivot-and-unpivot-with-power-bi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221c7098" target="_blank"&gt;https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221c7098&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can add some custom column and achive that output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 00:07:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Merge-Table-Columns-Chnaging-from-a-WIDE-format-to-a-LONG-data/m-p/2208418#M52061</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-11-26T00:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Table Columns - Chnaging from a WIDE format to a LONG data format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Merge-Table-Columns-Chnaging-from-a-WIDE-format-to-a-LONG-data/m-p/2211527#M52192</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, I can roughly understand your requirement, you want to create a new table in BI to convert the four columns in the product table into one column and display it in the new table, right? I think you can try my method:&lt;/P&gt;
&lt;P&gt;This is the test data I created based on your description:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, create a calculated column in the original table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LONG format =

COMBINEVALUES("-",[Time],[Jurisdictio],[Product],[Units_Sold])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create a new table like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LONG format = SUMMARIZE('Table','Table'[LONG format])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you can get what you want, like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;You can download my test pbix file below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Robert Qin&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&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.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 08:10:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Merge-Table-Columns-Chnaging-from-a-WIDE-format-to-a-LONG-data/m-p/2211527#M52192</guid>
      <dc:creator>v-robertq-msft</dc:creator>
      <dc:date>2021-11-29T08:10:55Z</dc:date>
    </item>
  </channel>
</rss>

