Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to make a title with multiple slicer values using conditional formatting for visual titles

 

I have a Filter that contains approx 8 values ...   as shown by ... below ... I would like the Visual Table below it to show something like "Selected Subject Categories: Carriers , Plant " 

 

It  will show if I only select one ... 

 

I did see the one where they Similiar Question wanted something from a slicer than all the Stacked columns  

 

Thanks for any help ...

Kathy

  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous , try this DAX measure:

     

    Dynamic Title =
    VAR Part1 = "Selected Subject Categories: "
    VAR Part2 =
        IF (
            ISFILTERED ( TableName[Subject Categories] ),
            CONCATENATEX (
                VALUES ( TableName[Subject Categories] ),
                TableName[Subject Categories],
                ", "
            ),
            "All"
        )
    RETURN
        Part1 & Part2

    This first checks to see if the user filtered that column.  If they didn't, return "Selected Subject Categories: All".  

     

    If they did, it will return the list separated by a comma.  Bear in mind if they select more than 3, this title may be too big.  There is a way to display "Selected Plant, Carriers, and 3 more..." if that is necessary.  Since you have a small amount of values, I think you're ok.

     

    Cheers,

     

    ~ Chris

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous , try this DAX measure:

     

    Dynamic Title =
    VAR Part1 = "Selected Subject Categories: "
    VAR Part2 =
        IF (
            ISFILTERED ( TableName[Subject Categories] ),
            CONCATENATEX (
                VALUES ( TableName[Subject Categories] ),
                TableName[Subject Categories],
                ", "
            ),
            "All"
        )
    RETURN
        Part1 & Part2

    This first checks to see if the user filtered that column.  If they didn't, return "Selected Subject Categories: All".  

     

    If they did, it will return the list separated by a comma.  Bear in mind if they select more than 3, this title may be too big.  There is a way to display "Selected Plant, Carriers, and 3 more..." if that is necessary.  Since you have a small amount of values, I think you're ok.

     

    Cheers,

     

    ~ Chris

     

     

  • Cmcmahan's avatar
    Cmcmahan
    Resident Rockstar

    Sure.  Your measure would look like this:

     

    TableTitle = "Selected Subject Categories:  
    " & CONCATENATEX(data_table, [category], ", ")