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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Meera556
Helper I
Helper I

How do I update TOP N visual with selections made on other visuals in the report

Hi,

I have created a report which contains top n bar chart, tree map and other visuals.I have created DAX for getting Top N values.It is updating correcting with the slicers present in the page. But when any selections is made on any other visuals the Top N visual is not updating correctly.

Can anyone help how to create Top N visual interactive with other visual in the report.

Below is the DAX code I have created

Rank app by errors= RANKX(ALL(business_servers[apps]),[errors],,DESC)
Top N apps by errors = if([Rank app by errors] <= 'Top N applications'[Top N applications Value],[errors])
Top N applications Value = SELECTEDVALUE('Top N applications'[Top N applications]5)
I have used ALLSELECTED instead of ALL but its not working
 
Thanks for your help in advance
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Drag this measure to the visual

Top n errors  calculate([errors],topn([Top N applications Value],all(business_servers[apps]),[errors]),values(business_servers[apps]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Drag this measure to the visual

Top n errors  calculate([errors],topn([Top N applications Value],all(business_servers[apps]),[errors]),values(business_servers[apps]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

Thanks for your reply.I have tried the above measure but its not working.

Hi,

Share the download link of the PBI file.  Show the problem there and the expected result.  In the PBI file, please only share the information that in required for answering the question.  Remove unwanted tables/columns/measures.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

The DAX measure you have sent is working fine. Thanks for your help

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Meera556 ,

 

Did @amitchandak  response solve your problem? If solved, please mark the helpful answer as a solution this will help more people, if not please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Hi @Anonymous ,

I haven't found th exact solution for the query I have posted.

amitchandak
Super User
Super User

@Meera556 , Refer

Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ

 

Power BI: rankx, topn, dynamic topn with numeric parameters
https://youtu.be/cN8AO3_vmlY?t=25620

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.