Forum Discussion
Anonymous
6 years agoNot applicable
Extract setting for a TopN filter
Hi,
I have a chart with a TopN filter. I want to dynamically change the title based on whether the filter is specifying the Top values or the Bottom values. How can I extract the Top/Bottom setting in DAX?
Thanks!
3 Replies
- VasTgMemorable Member
Anonymous
Check this out. https://blog.crossjoin.co.uk/2016/04/25/dynamic-chart-titles-in-power-bi/
If this helps, mark it as solution.
Kudos are good too.
- AnonymousNot applicable
It's a great blog post, but doesn't quite answer the question. What is needed is DAX code that will return whether the setting for the TopN filter is set to Top or set to Bottom. Need to know how to reference that setting.
- AnonymousNot applicable
Hi Anonymous ,
To get the dynamic titles using Top N slicer follow below steps,
1. Create a measure as
Top N Dynamic Title = "Top"&" "&SELECTEDVALUE('Top N'[Top N])&" Customers by Sales". Here Top N'[Top N] is the slicer and it passes the value that we choose.2. Select the chart that you are showing Top N values andgoto->formatting-->title->Title text->Expand the Eclipse(3 dots)->Conditional formatting->Top N Dynamic Title.It displays as Top 5 Customers by Sales if we choose 5 in Top N slicer.Accept it as a solution if this post works for you.