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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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