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
theunissenp
Helper I
Helper I

Dynamic title: my title should show the selected planning category in slicer

Hello Guys,

 

I created a report using a slicer where the user can select the desired planning category. My visual title or report title (or both) should show the selected value in the slicer?

 

Is this possible in Power BI an dif so how?

 

May thanks!

 

Paul

1 ACCEPTED SOLUTION
CheenuSing
Community Champion
Community Champion

Hi @theunissenp 

 

Please refer the link

 

https://blog.crossjoin.co.uk/2016/04/25/dynamic-chart-titles-in-power-bi/

 

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
CheenuSing
Community Champion
Community Champion

Hi @theunissenp 

 

Please refer the link

 

https://blog.crossjoin.co.uk/2016/04/25/dynamic-chart-titles-in-power-bi/

 

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Hello @CheenuSing 

 

My result should be as follows. If one category is selected then it should show in the title. If more selected it should give the result 'costs per region multiple catgories'

 

 

I used the following coding and i'm getting the following error: 'invalid token line 16 offset 31'

 

Have you got any idea what went wrong?

 

Title2 =
VAR SelectedCategories =
VALUES ( 'Ocin_Logistic'[Category.Category level 01] )
VAR NumberOfSelectedCategories =
COUNTROWS ( SelectedCategories )
RETURN
"Cost per Region "
& IF (
NumberOfSelectedCategories > 1,
"Multiple Categories",
"For "
& IF (
NumberOfSelectedDays = 1,
"",
CONCATENATEX (
VALUES(‘OCIN_LOGISTIC'[CATEGORY.CATEGORY Level 01]), ’OCIN_LOGISTIC'[CATEGORY.CATEGORY Level 01],
“, “)
)

 

regards

 

Paul

Hi @theunissenp 

 

Just corrected the syntax , try this out

 

Title2 =
VAR SelectedCategories =
    VALUES ( 'Ocin_Logistic'[Category.Category level 01] )
VAR NumberOfSelectedCategories =
    COUNTROWS ( SelectedCategories )
RETURN
    "Cost per Region "
        & IF (
            NumberOfSelectedCategories > 1,
            "Multiple Categories For "
            
                & IF (
                    NumberOfSelectedDays = 1,
                    "",
                    CONCATENATEX (
                        VALUES ( 'OCIN_LOGISTIC'[CATEGORY.CATEGORY Level 01] ),
                        'OCIN_LOGISTIC'[CATEGORY.CATEGORY Level 01],
                        ", "
                    )
                )
        )

 

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

@CheenuSing Thanks! Now it's working fine!

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.