Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to modify expression for display company value label ?

Hi All

 

Below blog post about " Dynamic Chart Title "

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

 

it have mentioned about below expression :-

 

Title =
"Sales Amount for "
    & CONCATENATEX (
        VALUES ( 'DimDate'[EnglishDayNameOfWeek] ),
        'DimDate'[EnglishDayNameOfWeek],
        ", "
    )
 
How to modify the above exprssion for pick up value label the company field ?
 
 
 

 

 
 
 
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous -

     

    Create a measure as below 

    Title =
    "Sales for "
    & CONCATENATEX (
    VALUES ( SALES[COMPANY] ),
    SALES[COMPANY],
    ", "
    )
  • Anonymous 

     

    Create the following measure and add it to the formula on title section

    Measure = "SALES FOR " & SELECTEDVALUE(SALES[COMPANY])

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous -

     

    Create a measure as below 

    Title =
    "Sales for "
    & CONCATENATEX (
    VALUES ( SALES[COMPANY] ),
    SALES[COMPANY],
    ", "
    )
  • themistoklis's avatar
    themistoklis
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    Create the following measure and add it to the formula on title section

    Measure = "SALES FOR " & SELECTEDVALUE(SALES[COMPANY])

     

  • Anonymous To be a more robust solution, either change your slicer to a single selection then use themistoklis measure but if you want to keep multiple selections in your slicer, you need to change measure to be more robust as suggested by Anonymous . But if lot more companies are selected then it will be a very long title. You can check my blog post to handle scenarios like this.

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Parry2K

      You seem to know a lot. Thank you.

      Paul 

  • Anonymous glad we could help. Good luck. Cheers!!

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.