Forum Discussion

ellegri's avatar
ellegri
Regular Visitor
2 years ago
Solved

Dynamic Title DAX

Hi all,    I am fairly new to Power BI and I am trying to write a DAX for a pie chart title to enable it to state e.g. which Practice has made the lowest number of referrals?   Any help would be ...
  • v-weiyan1-msft's avatar
    2 years ago

    Hi ellegri ,

     

    Based on your description,
    I created some data:

    Please try code as below to create a Measure.

    Pie chart title = 
    VAR Min_referrals = MIN('Table'[referrals])
    VAR Min_referrals_Practice = MINX(FILTER(ALL('Table'),'Table'[referrals] = Min_referrals),'Table'[Practice])
    RETURN
    "Practice " & Min_referrals_Practice & " has made the lowest number of referrals"

    Select your visual object , then go to the Visualizations pane.
    In the Format area, select the General tab, and then set Title to On to show the title options for the visual.
    Next to the Title text, select Conditional formatting (fx).

    Result is as below.

     

    Best Regards,
    Yulia Yan

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.