Forum Discussion
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 appreciated.
Thanks in advance
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.
3 Replies
- lbendlinSuper User
The title has to be fed by a measure, either implicit ("min referrals") or explicit, using MINX for example.
That's pretty much it - if you can't get it to work then you must be trying to use a column.
- v-weiyan1-msftCommunity Support
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.- ellegriRegular Visitor
This is more than helpful - thank you so much