Forum Discussion

AnnaMagnusson's avatar
4 years ago
Solved

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.. 

  • AnnaMagnusson's avatar
    AnnaMagnusson
    4 years ago

    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!

3 Replies

  • v-cazheng-msft's avatar
    v-cazheng-msft
    Icon for Community Support rankCommunity 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

    • AnnaMagnusson's avatar
      AnnaMagnusson
      Icon for Helper I rankHelper I

      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!