<?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: create two calculated columns (Concatenatex) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287489#M170178</link>
    <description>&lt;P&gt;Thanks for the reply. Previously, I also tried to use ChatGPT - gpt4, unfortunately it could not help me as in this case&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding column Value_Ver 2 comes out nonsense:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expected result is as follows:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Nov 2024 07:28:14 GMT</pubDate>
    <dc:creator>Kris48</dc:creator>
    <dc:date>2024-11-17T07:28:14Z</dc:date>
    <item>
      <title>create two calculated columns (Concatenatex)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287203#M170149</link>
      <description>&lt;P&gt;Please help me create two calculated columns. They can be created in Power Query (I don't care). I would like to create new "Module_Ver 2" and "Value_Ver 2" speakers. I have explained the problem in the pictures below&lt;BR /&gt;Link PBIX:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1lebnBAOhJITh1b3DwQjT221upIkNVaDL/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1lebnBAOhJITh1b3DwQjT221upIkNVaDL/view?usp=sharing&lt;/A&gt;&amp;nbsp;&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;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 16:45:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287203#M170149</guid>
      <dc:creator>Kris48</dc:creator>
      <dc:date>2024-11-16T16:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: create two calculated columns (Concatenatex)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287455#M170173</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="776716" data-lia-user-login="Kris48" class="lia-mention lia-mention-user"&gt;Kris48&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create the two calculated columns &lt;STRONG&gt;"Module_Ver 2"&lt;/STRONG&gt; and &lt;STRONG&gt;"Value_Ver 2"&lt;/STRONG&gt; in Power BI, you can use the &lt;CODE&gt;CONCATENATEX&lt;/CODE&gt; function in DAX. Here's how you can do it:&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Assumptions:&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Table Name:&lt;/STRONG&gt; Replace &lt;CODE&gt;'YourTable'&lt;/CODE&gt; with the actual name of your table.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Grouping Column:&lt;/STRONG&gt; Replace &lt;CODE&gt;'KeyColumn'&lt;/CODE&gt; with the column you want to group by (e.g., an ID or date).&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Columns to Concatenate:&lt;/STRONG&gt; &lt;CODE&gt;'Module'&lt;/CODE&gt; and &lt;CODE&gt;'Value'&lt;/CODE&gt; are the columns you want to concatenate.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;Steps:&lt;/STRONG&gt;&lt;/H3&gt;
&lt;H4&gt;&lt;STRONG&gt;1. Module_Ver 2 Column&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Create a new calculated column in your table with the following DAX formula:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Module_Ver 2 = 
VAR CurrentKey = 'YourTable'[KeyColumn]
RETURN
CONCATENATEX(
    FILTER(
        'YourTable',
        'YourTable'[KeyColumn] = CurrentKey
    ),
    'YourTable'[Module],
    ", "
)
&lt;/LI-CODE&gt;
&lt;H4&gt;&lt;STRONG&gt;2. Value_Ver 2 Column&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Create another calculated column with this formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Value_Ver 2 = 
VAR CurrentKey = 'YourTable'[KeyColumn]
RETURN
CONCATENATEX(
    FILTER(
        'YourTable',
        'YourTable'[KeyColumn] = CurrentKey
    ),
    'YourTable'[Value],
    ", "
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Explanation:&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;CODE&gt;CurrentKey&lt;/CODE&gt;:&lt;/STRONG&gt; Captures the value of the grouping key for the current row.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;CODE&gt;FILTER&lt;/CODE&gt;:&lt;/STRONG&gt; Filters the table to include only rows with the same key as the current row.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;CODE&gt;CONCATENATEX&lt;/CODE&gt;:&lt;/STRONG&gt; Concatenates the specified column's values (e.g., &lt;CODE&gt;'Module'&lt;/CODE&gt; or &lt;CODE&gt;'Value'&lt;/CODE&gt;) from the filtered table, separated by ", ".&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;Alternative Using Power Query:&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;If you prefer to do this in Power Query:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Group By Key Column:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Go to &lt;STRONG&gt;Home&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Group By&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;Group by your key column (&lt;CODE&gt;KeyColumn&lt;/CODE&gt;).&lt;/LI&gt;
&lt;LI&gt;Create two aggregation columns:
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Module_Ver 2:&lt;/STRONG&gt; Use the operation &lt;STRONG&gt;All Rows&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Value_Ver 2:&lt;/STRONG&gt; Use the operation &lt;STRONG&gt;All Rows&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Add Custom Columns:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;Add a custom column for &lt;CODE&gt;Module_Ver 2&lt;/CODE&gt;:&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;= Text.Combine([GroupedRows][Module], ", ")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a custom column for &lt;CODE&gt;Value_Ver 2&lt;/CODE&gt;:&lt;/P&gt;
&lt;P&gt;= Text.Combine([GroupedRows][Value], ", ")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Cleanup:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Remove unnecessary columns resulting from the grouping.&lt;/LI&gt;
&lt;LI&gt;Ensure only the desired columns remain.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;Replace &lt;CODE&gt;'YourTable'&lt;/CODE&gt;, &lt;CODE&gt;'KeyColumn'&lt;/CODE&gt;, &lt;CODE&gt;'Module'&lt;/CODE&gt;, and &lt;CODE&gt;'Value'&lt;/CODE&gt; with the actual names from your dataset.&lt;/LI&gt;
&lt;LI&gt;Ensure that your data model relationships support the calculations.&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;
&lt;P&gt;By following these steps, you should be able to create the two new columns as per your requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;STRONG&gt; helps&lt;/STRONG&gt;, please consider &lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Appreciate your Kudos!!&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank" rel="noopener noreferrer"&gt;LinkedIn&lt;/A&gt;|&lt;A href="https://twitter.com/VahidDMcom" target="_blank" rel="noopener noreferrer"&gt;Twitter&lt;/A&gt;|&lt;A href="https://www.vahiddm.com/" target="_blank" rel="noopener noreferrer"&gt;Blog&amp;nbsp;&lt;/A&gt;|&lt;A href="https://www.youtube.com/@databis" target="_blank" rel="noopener noreferrer"&gt;YouTube&lt;/A&gt;&lt;A href="https://www.youtube.com/@databis" target="_blank" rel="noopener noreferrer"&gt;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 06:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287455#M170173</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2024-11-17T06:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: create two calculated columns (Concatenatex)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287489#M170178</link>
      <description>&lt;P&gt;Thanks for the reply. Previously, I also tried to use ChatGPT - gpt4, unfortunately it could not help me as in this case&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding column Value_Ver 2 comes out nonsense:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expected result is as follows:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 07:28:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287489#M170178</guid>
      <dc:creator>Kris48</dc:creator>
      <dc:date>2024-11-17T07:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: create two calculated columns (Concatenatex)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287491#M170179</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="776716" data-lia-user-login="Kris48" class="lia-mention lia-mention-user"&gt;Kris48&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Module Ver 2&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Value Ver 2&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please fine the PBIX attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need a Power BI Consultation? Hire me on &lt;A href="https://bit.ly/4d3oy4s" target="_blank" rel="noopener"&gt;Upwork&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;Connect on &lt;A href="https://www.linkedin.com/in/tharun-kumar-ravikrindhi/" target="_blank" rel="noopener"&gt;LinkedIn&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;DIV class=""&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV class=""&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV style="border-radius: 1px; padding: 10px; border: solid #cccccc 1px; background: #fafafa no-repeat right 10px center;"&gt;&lt;BR /&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG style="margin-right: 3px;"&gt;&lt;STRONG style="margin-right: 3px;"&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG style="margin-right: 3px;"&gt;&lt;STRONG style="margin-right: 3px;"&gt;If I helped you, click on the Thumbs Up to give Kudos.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;BR /&gt;
&lt;P style="padding: 0; margin: 5px 50px 0 0;"&gt;Proud to be a Super User!&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 17 Nov 2024 07:36:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/create-two-calculated-columns-Concatenatex/m-p/4287491#M170179</guid>
      <dc:creator>tharunkumarRTK</dc:creator>
      <dc:date>2024-11-17T07:36:19Z</dc:date>
    </item>
  </channel>
</rss>

