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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I
Helper I

Dynamic Top N filter for graph


Thank to Gilbet's post 'Dynamic TopN made easy with What If Parameter' I have created a top N filter in my PowerBI report.


It is working well for table visual.

But I have a line graph which shows customer wise revenue across months, when I try filter it with TopN visual, it is showing top N customers in each month, resulting in a discontinuous graph.

Is there way to filter it based on customer grand total instead of monthly total? (similar to built in topN filter but dynamic)




Resident Rockstar
Resident Rockstar

Hi @ONCKdata,


I 'm not very clear about your scenario. Which TopN do you want to filter? Customer or Revenue?


If it is convenient, could you share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)


I would appreciate it If you could describe your expected output in more details.


Best Regards,


Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


Thank you for the reply.


I have added an graphical representation of desired and actual output, please find this link




Hi Cherry,

I was just verifying the file that I have sent you, magically, the TopN filter from DAX is working after adding the required measure in the inbuilt TopN filter, i.e., topN in the 'desired' sheet if I give an arbitrarily large input of for the inbuilt TopN under filters, the dynamic one is giving desired output.


I do not understand the logic behind it, though.

Helpful resources


Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.