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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not 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 3
VasTg
Memorable Member
Memorable 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.

Connect on LinkedIn
Anonymous
Not 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.

Anonymous
Not 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 and
goto->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.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors