Mearns Learns

Table Mountain built with blocks

Dynamic text

Headings can be used to display what values have been selected by using dynamic text. This adds another visual inicator for the user when they are viewing data.

There are two issues to be aware of when using it. First, dynamic text cannot be displayed in a Text box but a Card can be used instead. Second, if too many values are selected displaying them all becomes counter productive. Creating visual clutter.

How to

Add a card to the canvas.

Create a measure for the text.

Heading text = IF(
ISFILTERED('Head count'[Employee Name]),
"Utilization for " & SELECTEDVALUE('Head count by period'[Employee Name]),
"Utilization by Person")

This works for single value and no selections but fails for multiple selections.

Dynamic text Dynamic text

Dynamic text Dynamic text

If you are expecting only a few items to be selected use this measure instead;

Heading text few = IF(
ISFILTERED('Head count by period'[Employee Name]),
"Utilization for " & CONCATENATEX(VALUES('Head count by period'[Employee Name]),'Head count by period'[Employee Name],","),
"Utilization by Person")

However it quickly gets unreadable if there are a large number of selections.

Dynamic text Dynamic text

A more comprehensive solution is to show a fixed number of selections and then fall back to some default text. This can be done using this measure.

Heading text multi = 
VAR NoSelected = COUNTROWS(VALUES('Head count by period'[Employee Name]))
VAR Concat = "Utilization for " & CONCATENATEX(VALUES('Head count by period'[Employee Name]),'Head count by period'[Employee Name],", ")

RETURN IF(ISFILTERED('Head count by period'[Employee Name]),
	IF(NoSelected > 3,"Utilization by Person, multiple people selected",Concat),
	"Utilization by Person")

Dynamic text Dynamic text