<?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 Selected Value as a dynamic header in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Selected-Value-as-a-dynamic-header/m-p/217269#M37</link>
    <description>&lt;P&gt;Most reports I make have a dynamic header using the Enlighten Data Story where I show which filter values the user has currently selected as they interact with the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Selected State = 
VAR __allLabel = "The U.S."
VAR __maxCount = 5
VAR __maxLabel = "multiple states"
VAR __totalCount = CALCULATE(DISTINCTCOUNT('Table'[State]),ALL('Table'))
VAR __selectedCount = DISTINCTCOUNT('Table'[State])
RETURN
	IF(		
		__selectedCount = 1,
		VALUES('Table'[State]), 
		IF (
			__selectedCount = __totalCount, 
			__allLabel,
			IF (
				__selectedCount &amp;gt; __maxCount,
				__maxLabel,
				CONCATENATEX(TOPN(__selectedCount-1,VALUES('Table'[State])),'Table'[State],", ") &amp;amp; " and " &amp;amp; LASTNONBLANK(VALUES('Table'[State]),true)
			)
		)
	)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiNTU2ZTM2MzgtZGNlMS00MGE2LTljNTEtMzc0ZDhkNzc2NDdkIiwidCI6Ijk0MjYwZjAzLTA3OTMtNDg0YS05MWNmLWJlYmU1ODQzMTliYyIsImMiOjEwfQ&lt;/SPAN&gt;</description>
    <pubDate>Mon, 24 Jul 2017 05:34:24 GMT</pubDate>
    <dc:creator>verneroberts</dc:creator>
    <dc:date>2017-07-24T05:34:24Z</dc:date>
    <item>
      <title>Selected Value as a dynamic header</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Selected-Value-as-a-dynamic-header/m-p/217269#M37</link>
      <description>&lt;P&gt;Most reports I make have a dynamic header using the Enlighten Data Story where I show which filter values the user has currently selected as they interact with the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Selected State = 
VAR __allLabel = "The U.S."
VAR __maxCount = 5
VAR __maxLabel = "multiple states"
VAR __totalCount = CALCULATE(DISTINCTCOUNT('Table'[State]),ALL('Table'))
VAR __selectedCount = DISTINCTCOUNT('Table'[State])
RETURN
	IF(		
		__selectedCount = 1,
		VALUES('Table'[State]), 
		IF (
			__selectedCount = __totalCount, 
			__allLabel,
			IF (
				__selectedCount &amp;gt; __maxCount,
				__maxLabel,
				CONCATENATEX(TOPN(__selectedCount-1,VALUES('Table'[State])),'Table'[State],", ") &amp;amp; " and " &amp;amp; LASTNONBLANK(VALUES('Table'[State]),true)
			)
		)
	)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiNTU2ZTM2MzgtZGNlMS00MGE2LTljNTEtMzc0ZDhkNzc2NDdkIiwidCI6Ijk0MjYwZjAzLTA3OTMtNDg0YS05MWNmLWJlYmU1ODQzMTliYyIsImMiOjEwfQ&lt;/SPAN&gt;</description>
      <pubDate>Mon, 24 Jul 2017 05:34:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Selected-Value-as-a-dynamic-header/m-p/217269#M37</guid>
      <dc:creator>verneroberts</dc:creator>
      <dc:date>2017-07-24T05:34:24Z</dc:date>
    </item>
  </channel>
</rss>

