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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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