Showing results for 
Search instead for 
Did you mean: 

How to Create Dynamic Visualizations Based on Ranking Logic

Have you ever wanted to create a visualization that changes based on any ranking selection you could make? You can change the size of your Power BI visuals based on ranking logic. Being able to dynamically select a slicer or item on a chart that changes the visualization on your report, into a more specific insight based on ranking, is just powerful and compelling. 


Think of a scenario where you want to analyze and showcase your top 10 or 20 clients. You’d like to see who among your clients or customers is contributing the most to your profits from your total sales. You want to be able to narrow down your search to your top 5 or 3 clients. This is possible and easily attainable in Power BI. 


Being able to dynamically select a slicer or item on a chart that changes the visualization on your report, into a more specific insight based on ranking, is just powerful and compelling. 


In this post, I showcase my Power BI tutorials that demonstrate a visualization technique where you could use the ranking function, RANKX, to control what you want to show inside your visualizations. 


Click on the link below to view the first video tutorial. It shows how you can dynamically adjust the size of your visual via the result ranking in Power BI. 



In this tutorial, I create dynamic visuals containing my top 10 customers for specific products. To make this all work, I used RANKX inside the CALCULATE statement. If you could get a good grasp of how these functions work together, it will be a huge help for you when it comes to the more technical aspects of implementing DAX measures inside your models. 


Learn how you can rank customers in Power BI with DAX based on their sales or profits, and then create visualizations that dynamically change for additional filters that you may put in place. 


2020-07-01 (14).pngIn the next tutorial, I use the RANKX function, but not with CALCULATE. Here, I utilize a supporting table and create a slicer that enables me to select top 20, 10, 5, etc. Below is the link to the full video tutorial. 



This is a great visualization technique that I showcase in this tutorial. It only shows in a visual the number of dimensions based on a ranking.  


Once you understand the patterns, you can apply this technique to other scenarios in many ways. You could use it on your products, salespeople, regions, or any other dimension or filter that you have inside your model. 


2020-07-01 (17).png


Here’s another tutorial on how you can create dynamic visuals based on ranking. This showcases dynamic ranking tables using RANKX within CALCULATE. The visuals here show a range of data or information dynamically in a table, but the information shown is based on a specific ranking on a single calculation. 


Here’s the link to the video tutorial. Watch it and see how I achieved this. 


In creating dynamic ranking tables, I’m able to look at my Top 20 Customers based on sales across different other metrics, such as profits, growth, and margins. This visualization technique will also automatically update the table after any change of context on the report page. 


2020-07-01 (20).png


Key Take Away 


This is a really powerful visualization technique that you can use in Power BI to create dynamic visuals. By using the powerful ranking DAX function, RANKX, you can create many compelling visualizations in your Power BI reports. 


Using dynamic visuals with ranking-based parameters enables you to drill into your reports and see what’s driving your profits and customer performance, for example. You’ll get specific results and useful insights. You can also isolate your top and bottom clients, or your best and worst performing salespeople, or top selling products, etc. This technique will enable you to showcase these types of analyses visually. 


I’ve used this technique in many of the Power BI models at the Enterprise DNA Showcase. Check this out on our website, and you’ll certainly learn a lot. 


All the best! 




***** Related Links ***** 

Creating Dynamic Ranking Tables Using RANKX In Power BI 

Creating Multi Threaded Dynamic Visuals – Advanced Power BI Technique 

The Ultimate Advanced Viz. Technique in Power BI – Multi Measure Dynamic Visuals 


***** Related Course Modules ***** 

Data Visualization Tips 

Advanced DAX Combinations 

Financial Reporting w/ Power BI 


***** Related Support Forum Posts ***** 

Dynamic Visuals – Number Formatting – 

Passing a visual-level filter via a dynamic measure 

Dynamically Change X-Axis (Yearly and Quarterly) within a Visual via Slicer 

For more dynamic visuals support queries to review see here….