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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
AnnaMagnusson
Helper I
Helper I

Rank on two tables visuals

Hi!

 

What I want to do is:

If the ParameterName in Table 1 have the rank of 1, then I want the ParameterName in Table 2 to be shown first/on top (even if that ParameterName doesn't have rank 1, or the highest diff in MovingAverage).  //It is something with Pareto apparently 

 

Is it possible?

 

Note that I am not talking abput tables where I have different columns/calc columns, but instead table visuals. I have tried googling but everytime they think I mean a full table.. 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@AnnaMagnusson , You can switch Rank measure using slicer or context.

 

You can use isinscope or isfiltered to switch measure.

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

View solution in original post

Hi!

 

Sorry for not answering. 


I think the problem is fixed. Your solution was in the right direction with using switch. Since I only had measures and only one column (parameters) I couldn't use isinscope or isfiltered (what I could understand).

 

What I ended up using was:

RankCompare = SWITCH( TRUE(),
[Rank F] = 1, "1",
[Rank F] = 2, "2",
[Rank F] = 3, "3",
[Rank F] = 4, "4",
[Rank F] = 5, "5")

 

where [Rank F] = if( isblank(measure), blank(), rankx ( all( table [column]) , measure, , , dense)) is from the ranking on the first table visual and then I just sorted the second table visual on RankCompare.

 

So thanks for the help!

View solution in original post

3 REPLIES 3
v-cazheng-msft
Community Support
Community Support

Hi @AnnaMagnusson ,

 

May I know whether your issue has been resolved? If you still have problems on it, could you please provide some sample data from the tables in your model and let us know the relationship between them?

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

Hi!

 

Sorry for not answering. 


I think the problem is fixed. Your solution was in the right direction with using switch. Since I only had measures and only one column (parameters) I couldn't use isinscope or isfiltered (what I could understand).

 

What I ended up using was:

RankCompare = SWITCH( TRUE(),
[Rank F] = 1, "1",
[Rank F] = 2, "2",
[Rank F] = 3, "3",
[Rank F] = 4, "4",
[Rank F] = 5, "5")

 

where [Rank F] = if( isblank(measure), blank(), rankx ( all( table [column]) , measure, , , dense)) is from the ranking on the first table visual and then I just sorted the second table visual on RankCompare.

 

So thanks for the help!

amitchandak
Super User
Super User

@AnnaMagnusson , You can switch Rank measure using slicer or context.

 

You can use isinscope or isfiltered to switch measure.

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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