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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
freakinaditya
Helper II
Helper II

How to filter visualizations based on ranking from other visuals?

Hello Community,

 

I have a use case from the client end which I am unable to find on the web. Hopefully, I get a solution here. 

Scenario -

I have made a report something like this. I have two filters on the top date and product name. A column chart showing total sales by country below that I have 2-2 column chart showing total sales by week no. and total sales by ship name respectively.

 

freakinaditya_0-1641990341282.png

 

what I want --

 

Below 2-2 graphs should filter (top 2) data from the top column chart (total sales by country). If any filter from the date and product name is applied then the last 2 graphs should be according to the top 2 countries only.

 

The graph in the second row - filter by rank 1st country (applied any filter)

The graph in the third row - filter by rank 2nd country (applied any filter)

 

Suppose if apply any filter in the product name -

 

freakinaditya_1-1641991150662.png

 

Now my top 2 countries are Canada and Brazil. So, accordingly, the graph in the second row should filter according to Canada and the graph in the third row should filter according to Brazil now.

 

Top 1st in the second row

Top 2nd in the third row.

 

I tried finding the rank of the country with rankx() but when I apply on the last 2 visuals then I am getting blank.

 

How can I achieve this?

Thanks in advance!

4 REPLIES 4
v-yetao1-msft
Community Support
Community Support

Hi @freakinaditya 

I found two similar cases, they created dynamic visualizations based on ranking logic, you can refer to them .

https://blog.enterprisedna.co/make-your-visuals-dynamic-based-on-rankings-in-power-bi/

https://community.powerbi.com/t5/Community-Blog/How-to-Create-Dynamic-Visualizations-Based-on-Rankin...

 

Best Regard

Community Support Team _ Ailsa Tao

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

@v-yetao1-msft Thank you for your response but it does not match my scenario.

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. 

Hi @lbendlin, Please find the Use Case source file that describes my use case. Have a glance at it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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