Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jodes
Helper II
Helper II

Dynamic title name when "All" is my filter

The April 2019 dynamic chart title update works great, but when I have "All" in my filter locations selected it does not display them. It only displays the name when I have it filtered. Can I get it to display them all at once?

 

I have a line chart that shows net migration for 3 states. When I select all 3 of my states I want it to say:

"Net Migration for Montana, Washington, California"

 

But when I only select Montana, for example, obviously I'd like it to just say "Net Migration for Montana".

 

Thanks.

3 ACCEPTED SOLUTIONS
OwenAuger
Super User
Super User

@Jodes 

This is certainly possible if you create an appropriate measure for the title.

Title Measure =
"Net Migration for " &
CONCATENATEX (
    VALUES ( YourTable[State] ),
    YourTable[State],
    ", "
)

A measure like this should display all States regardless of how many are filtered or whether all are selected.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

Yes, the order can be controlled by adding a 4th argument toCONCATENATEX.

See https://dax.guide/concatenatex/ for full explanation

 

Title Measure =
"Net Migration for " &
CONCATENATEX (
    VALUES ( YourTable[State] ),
    YourTable[State],
    ", ",
    YourTable[State]
)

Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

@Jodes 

Something like this should work:

 

Title Measure =
"Starts For "
    & IF (
        ISFILTERED ( 'All Data'[Developer] ),
        CONCATENATEX (
            VALUES ( 'All Data'[Developer] ),
            'All Data'[Developer],
            ", ",
            'All Data'[Developer]
        ),
        "All"
    )

Alternatively, you could test whether there are fewer than a certain number of filtered Developers, and display "Multiple" if more than that number are filtered:

 

 

Title Measure =
VAR Threshold = 10
RETURN
    "Starts For "
        & IF (
            ISFILTERED ( 'All Data'[Developer] ),
            IF (
                DISTINCTCOUNT ( 'All Data'[Developer] ) <= Threshold,
                CONCATENATEX (
                    VALUES ( 'All Data'[Developer] ),
                    'All Data'[Developer],
                    ", ",
                    'All Data'[Developer]
                ),
                "Multiple"
            ),
            "All"
        )

Regards,
Owen

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

5 REPLIES 5
OwenAuger
Super User
Super User

@Jodes 

This is certainly possible if you create an appropriate measure for the title.

Title Measure =
"Net Migration for " &
CONCATENATEX (
    VALUES ( YourTable[State] ),
    YourTable[State],
    ", "
)

A measure like this should display all States regardless of how many are filtered or whether all are selected.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Hi @OwenAuger,

 

I have another chart that is filtered by almost 50 Developers. Obviously cannot display all their names in a chart. When I have no filter selected (eg. "Developer - All"), how can I get the chart to display a dynamic title that says "Starts For All"?

 

Here's my current measure:

 

Title Measure =
"Starts For " &
CONCATENATEX (
VALUES( 'All Data'[Developer] ),
'All Data'[Developer],
", ", 'All Data'[Developer]
)

 

Developers.JPG

@Jodes 

Something like this should work:

 

Title Measure =
"Starts For "
    & IF (
        ISFILTERED ( 'All Data'[Developer] ),
        CONCATENATEX (
            VALUES ( 'All Data'[Developer] ),
            'All Data'[Developer],
            ", ",
            'All Data'[Developer]
        ),
        "All"
    )

Alternatively, you could test whether there are fewer than a certain number of filtered Developers, and display "Multiple" if more than that number are filtered:

 

 

Title Measure =
VAR Threshold = 10
RETURN
    "Starts For "
        & IF (
            ISFILTERED ( 'All Data'[Developer] ),
            IF (
                DISTINCTCOUNT ( 'All Data'[Developer] ) <= Threshold,
                CONCATENATEX (
                    VALUES ( 'All Data'[Developer] ),
                    'All Data'[Developer],
                    ", ",
                    'All Data'[Developer]
                ),
                "Multiple"
            ),
            "All"
        )

Regards,
Owen

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Thank you. Is there anyway to list them in alphabetical order? The title order is different than the chart's Legend order and it looks funny.

Yes, the order can be controlled by adding a 4th argument toCONCATENATEX.

See https://dax.guide/concatenatex/ for full explanation

 

Title Measure =
"Net Migration for " &
CONCATENATEX (
    VALUES ( YourTable[State] ),
    YourTable[State],
    ", ",
    YourTable[State]
)

Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.