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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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.

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors