<?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 Concatenating data within RELATEDTABLE output in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767791#M3530</link>
    <description>&lt;P&gt;My report has a list of email addresses, and the request from the users is to have a "mailto" hyperlink they can click to send an email to all addresses.&amp;nbsp; The list needs to be dynamic based on slicer selections.&amp;nbsp; For example, if there are six addresses in the table but the user selects a slicer to narrow the list to three addresses, the hyperlink should only display those three addresses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have so far:&lt;/P&gt;&lt;PRE&gt;Email All = "mailto:" &amp;amp; CONCATENATEX( RELATEDTABLE(ENVH), ENVH[Email], "; ")&lt;/PRE&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Produces this:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;mailto: userBob@myemail.com&lt;/P&gt;&lt;P&gt;mailto: userJohanna@myemail.com&lt;/P&gt;&lt;P&gt;mailto: userTom@myemail.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;What I need to produce is this:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;mailto: userBob@myemail.com; userJohanna@myemail.com; userTom@myemail.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I originally tried this:&lt;/P&gt;&lt;PRE&gt;Email All = "mailto:" &amp;amp; CONCATENATEX( ENVH, ENVH[Email], "; ")&lt;/PRE&gt;&lt;P&gt;But that gives me all six addresses, and ignores my slicer selections (addresses in red should NOT be included)...&lt;/P&gt;&lt;P&gt;mailto: &lt;STRONG&gt;&lt;FONT color="#99CC00"&gt;userBob@myemail.com; userJohanna@myemail.com; userTom@myemail.com;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;userBeth@myemail.com; userPaul@myemail.com; userGeorge@myemail.com&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2019 16:36:19 GMT</pubDate>
    <dc:creator>pdbenbow</dc:creator>
    <dc:date>2019-08-15T16:36:19Z</dc:date>
    <item>
      <title>Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767791#M3530</link>
      <description>&lt;P&gt;My report has a list of email addresses, and the request from the users is to have a "mailto" hyperlink they can click to send an email to all addresses.&amp;nbsp; The list needs to be dynamic based on slicer selections.&amp;nbsp; For example, if there are six addresses in the table but the user selects a slicer to narrow the list to three addresses, the hyperlink should only display those three addresses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have so far:&lt;/P&gt;&lt;PRE&gt;Email All = "mailto:" &amp;amp; CONCATENATEX( RELATEDTABLE(ENVH), ENVH[Email], "; ")&lt;/PRE&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Produces this:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;mailto: userBob@myemail.com&lt;/P&gt;&lt;P&gt;mailto: userJohanna@myemail.com&lt;/P&gt;&lt;P&gt;mailto: userTom@myemail.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;What I need to produce is this:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;mailto: userBob@myemail.com; userJohanna@myemail.com; userTom@myemail.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I originally tried this:&lt;/P&gt;&lt;PRE&gt;Email All = "mailto:" &amp;amp; CONCATENATEX( ENVH, ENVH[Email], "; ")&lt;/PRE&gt;&lt;P&gt;But that gives me all six addresses, and ignores my slicer selections (addresses in red should NOT be included)...&lt;/P&gt;&lt;P&gt;mailto: &lt;STRONG&gt;&lt;FONT color="#99CC00"&gt;userBob@myemail.com; userJohanna@myemail.com; userTom@myemail.com;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;userBeth@myemail.com; userPaul@myemail.com; userGeorge@myemail.com&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 16:36:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767791#M3530</guid>
      <dc:creator>pdbenbow</dc:creator>
      <dc:date>2019-08-15T16:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767836#M3533</link>
      <description>Can you show the model, please? RELATEDTABLE goes from the one side of the relation to the many side. I'd like to know what you store in your tables and how they're linked and by which fields you slice. Without this knowledge I don't think anyone could give you a correct answer...&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Thu, 15 Aug 2019 17:49:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767836#M3533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-15T17:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767840#M3535</link>
      <description>&lt;P&gt;The data model is a single table with no relationships. That's why I don't think RELATEDTABLE is what I should be using. There must be another way to concatenate the values after they've been sliced.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 17:54:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767840#M3535</guid>
      <dc:creator>pdbenbow</dc:creator>
      <dc:date>2019-08-15T17:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767841#M3536</link>
      <description>&lt;PRE&gt;[Email All] =
var __concatenatedEmails =
	CONCATENATEX(
		DISTINCT( ENVH[Email] ),
		ENVH[Email],
		"; "
	)
var __mailtoString =
	"mailto:" &amp;amp; __concatenatedEmails
return
	__mailtoString&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Aug 2019 17:57:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767841#M3536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-15T17:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767853#M3537</link>
      <description>&lt;P&gt;Nope, doesn't work. That gives me the exact same result as my original formula:&lt;/P&gt;&lt;P&gt;Original formula:&lt;/P&gt;&lt;PRE&gt;Email All = "mailto:" &amp;amp; CONCATENATEX( ENVH, ENVH[Email], "; ")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the output when not sliced:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is the output when sliced:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The slicer is having no effect. When I toggle that slicer, there should only be three email addresses listed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 18:08:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/767853#M3537</guid>
      <dc:creator>pdbenbow</dc:creator>
      <dc:date>2019-08-15T18:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/771870#M3735</link>
      <description>&lt;P&gt;I was able to get what I needed by converting the calculated column into a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DAX:&lt;/P&gt;&lt;PRE&gt;Email All = "mailto: " &amp;amp; CONCATENATEX(VALUES(ENVH[Email]),ENVH[Email],"; ")&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Aug 2019 12:24:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/771870#M3735</guid>
      <dc:creator>pdbenbow</dc:creator>
      <dc:date>2019-08-21T12:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/772240#M3743</link>
      <description>Well, my formula was A MEASURE. When I create a calculated column I state this fact explicitly.&lt;BR /&gt;&lt;BR /&gt;Slicers NEVER affect calculated columns the way you thought. They can only filter the columns for certain values that have been precalculated in there, nothing else.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;Darek</description>
      <pubDate>Wed, 21 Aug 2019 18:05:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/772240#M3743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-21T18:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/3211985#M117173</link>
      <description>&lt;P&gt;can you make an actual button with this measure? i got it to work but it will only work in a table. I set the button to weburl and add the measure but nothing happens.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 22:18:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/3211985#M117173</guid>
      <dc:creator>crjackson</dc:creator>
      <dc:date>2023-04-28T22:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/3213629#M117267</link>
      <description>&lt;P&gt;We got it to work with a button. Not sure if this applies to your situation, but "mailto" has a limit of 2,000 characters. We found the button would not function if the concatenated list was over 2,000 characters long. We used slicers so our users could break the list down into smaller, more manageable groups. This allows them to get the "mailto" under 2,000 characters, which allows the button to function.&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 11:56:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/3213629#M117267</guid>
      <dc:creator>pdbenbow</dc:creator>
      <dc:date>2023-05-01T11:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating data within RELATEDTABLE output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/3222964#M117898</link>
      <description>&lt;P&gt;Hmmm. I have a slicer and it still doesn't work for me even with just two email addresses&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 00:57:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Concatenating-data-within-RELATEDTABLE-output/m-p/3222964#M117898</guid>
      <dc:creator>crjackson</dc:creator>
      <dc:date>2023-05-06T00:57:33Z</dc:date>
    </item>
  </channel>
</rss>

