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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ONCKdata
Helper I
Helper I

Dynamic Top N filter for graph

Hi,

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)

 

Thanks

 

3 REPLIES 3
v-piga-msft
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,

Cherry

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.

Hi,

Thank you for the reply.

 

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

 

 

Thanks.

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

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.