<?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 Help with Concatenate Text in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267314#M169172</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I’m trying to create a measure in Power BI that concatenates information from two related tables. Specifically, I want to display the phrase “Head: Professional Name (&lt;SPAN&gt;GESTOR&lt;/SPAN&gt;)” where “Professional Name” comes from the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;d_Sócios&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table and “&lt;SPAN&gt;GESTOR&lt;/SPAN&gt;” comes from the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;f_PRINCIPAL&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table.&lt;/P&gt;&lt;P&gt;The tables&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;d_Sócios&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;f_PRINCIPAL&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are related by the columns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Sigla&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;d_Sócios) and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;GESTOR&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;f_PRINCIPAL).&lt;BR /&gt;&lt;BR /&gt;It's possible to do that in Power BI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to get the measure to work correctly.&lt;BR /&gt;I've tried with the CONCATENATE, but without success.&lt;BR /&gt;Could someone help me correct this code or suggest a better approach?&lt;/P&gt;&lt;P&gt;Also, would it be better to do this with DAX code or by concatenating directly in a text box?&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;</description>
    <pubDate>Fri, 01 Nov 2024 18:39:33 GMT</pubDate>
    <dc:creator>amaral_diego</dc:creator>
    <dc:date>2024-11-01T18:39:33Z</dc:date>
    <item>
      <title>Help with Concatenate Text in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267314#M169172</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I’m trying to create a measure in Power BI that concatenates information from two related tables. Specifically, I want to display the phrase “Head: Professional Name (&lt;SPAN&gt;GESTOR&lt;/SPAN&gt;)” where “Professional Name” comes from the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;d_Sócios&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table and “&lt;SPAN&gt;GESTOR&lt;/SPAN&gt;” comes from the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;f_PRINCIPAL&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table.&lt;/P&gt;&lt;P&gt;The tables&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;d_Sócios&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;f_PRINCIPAL&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are related by the columns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Sigla&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;d_Sócios) and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;GESTOR&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;f_PRINCIPAL).&lt;BR /&gt;&lt;BR /&gt;It's possible to do that in Power BI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to get the measure to work correctly.&lt;BR /&gt;I've tried with the CONCATENATE, but without success.&lt;BR /&gt;Could someone help me correct this code or suggest a better approach?&lt;/P&gt;&lt;P&gt;Also, would it be better to do this with DAX code or by concatenating directly in a text box?&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 18:39:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267314#M169172</guid>
      <dc:creator>amaral_diego</dc:creator>
      <dc:date>2024-11-01T18:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Concatenate Text in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267356#M169181</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="797318" data-lia-user-login="amaral_diego" class="lia-mention lia-mention-user"&gt;amaral_diego&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how are they related?&lt;/P&gt;
&lt;P&gt;Supposing d_Sócios is on the one side, try like:&lt;/P&gt;
&lt;P&gt;measure =&lt;/P&gt;
&lt;P&gt;MAX(d_Sócios[Professional Name])&lt;/P&gt;
&lt;P&gt;&amp;amp;&lt;/P&gt;
&lt;P&gt;MAXX(RELATEDTABLE(f_PRINCIPAL), f_PRINCIPAL[GESTOR])&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 19:47:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267356#M169181</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-11-01T19:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Concatenate Text in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267366#M169183</link>
      <description>&lt;P&gt;I've tried with your code, without success,&lt;BR /&gt;they are related many to one&lt;BR /&gt;many from GESTOR Column from the table f_PRINCIPAL&lt;BR /&gt;one from Sigla Column from the table d_Sócios&lt;/P&gt;&lt;P&gt;I now how to do it in power apps&lt;BR /&gt;is something like that&lt;BR /&gt;Text = "Head: " &amp;amp; LookUp(d_Sócios, ID = ThisItem.ID, [Nome Profissional]) &amp;amp; " (" &amp;amp; LookUp(f_PRINCIPAL, ID = ThisItem.ID, [GESTOR]) &amp;amp; ")"&lt;/P&gt;&lt;P&gt;I need to know, if is possible to do something similiar on Power BI&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 20:05:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267366#M169183</guid>
      <dc:creator>amaral_diego</dc:creator>
      <dc:date>2024-11-01T20:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Concatenate Text in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267398#M169188</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="797318" data-lia-user-login="amaral_diego" class="lia-mention lia-mention-user"&gt;amaral_diego&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then try like:&lt;/P&gt;
&lt;P&gt;measure =&lt;/P&gt;
&lt;P&gt;MAXX(RELATEDTABLE(d_Sócios),d_Sócios[Professional Name])&lt;/P&gt;
&lt;P&gt;&amp;amp;&lt;/P&gt;
&lt;P&gt;MAX(f_PRINCIPAL[GESTOR])&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 20:54:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4267398#M169188</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-11-01T20:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Concatenate Text in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4271229#M169413</link>
      <description>&lt;P&gt;Thanks for your assistance, but I've found another way more familiar to do.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 18:50:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4271229#M169413</guid>
      <dc:creator>amaral_diego</dc:creator>
      <dc:date>2024-11-05T18:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Concatenate Text in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4271810#M169445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="797318" data-lia-user-login="amaral_diego" class="lia-mention lia-mention-user"&gt;amaral_diego&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You can use the below DAX:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;HeadInfo ="Head: " &amp;amp; SELECTEDVALUE(d_Sócios[Professional Name]) &amp;amp; " (" &amp;amp;&amp;nbsp;LOOKUPVALUE(f_PRINCIPAL[GESTOR], f_PRINCIPAL[Sigla], d_Sócios[Sigla]) &amp;amp; ")"&lt;/DIV&gt;&lt;/DIV&gt;&lt;H3&gt;Explanation&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;SELECTEDVALUE(d_Sócios[Professional Name])&lt;/STRONG&gt;: This function retrieves the Professional Name from the d_Sócios table. SELECTEDVALUE is helpful here as it returns the single value in a context, or blank if there are multiple.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;LOOKUPVALUE(f_PRINCIPAL[GESTOR], f_PRINCIPAL[Sigla], d_Sócios[Sigla])&lt;/STRONG&gt;: This function looks up the GESTOR value in f_PRINCIPAL based on the matching Sigla in d_Sócios. It will return the value from f_PRINCIPAL if there is a unique match.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Concatenation&lt;/STRONG&gt;: The &amp;amp; operator is used to concatenate the strings with custom text as specified.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;Make sure your relationship between d_Sócios[Sigla] and f_PRINCIPAL[Sigla] is set up correctly in the model.&lt;/LI&gt;&lt;LI&gt;This measure should be placed in a visual that has context for d_Sócios[Sigla] so that SELECTEDVALUE can retrieve the correct Professional Name.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;STRONG&gt;Alternative:&lt;/STRONG&gt; Concatenation in a Calculated Column&lt;/H3&gt;&lt;P&gt;If you need the result at a row level rather than a measure, you could also create a calculated column instead of a measure, using similar logic.&lt;/P&gt;&lt;P&gt;Let me know if you need further customization!&lt;BR /&gt;&lt;BR /&gt;Give "Kudos" if you find it helpful! Happy Learning!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 05:03:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Concatenate-Text-in-Power-BI/m-p/4271810#M169445</guid>
      <dc:creator>Poojara_D12</dc:creator>
      <dc:date>2024-11-06T05:03:37Z</dc:date>
    </item>
  </channel>
</rss>

