Forum Discussion

HugoJesus's avatar
HugoJesus
Icon for Helper IV rankHelper IV
4 years ago
Solved

RANK BASED EXPRESSION TABLE

Hi everyone, 

 

I need help with this, I've searched in all forums but, noone have a solution to my case.

 

For better understanding, I've attached the example of my PBIX, in a very very simple way, but mine is more complex.

 
 
First, without any filters, my table RANK works perfectaly:

When I filter the Hotel = 2 the RANK duplicate and the RANK of the summarized is stuck to the first data.

 

Anyone have an idea to remove Duplicated values in the VAR RANK Column, or the summarized changing with the filter.

 

Be attention, I've a lot of filters in the original PBIX, I can't limit to one filter at all.

 

Thanks in advance, 

Hugo Jesus

 

5 Replies

  • Try something like this:

    My Rank = CALCULATE ( RANK (sorry, I don't remember the syntax of RANK function), ALL ( 'Main Table' ) )

    That will ensure that the [My Rank] measure is NOT affected by slices of the 'Main Table'.

    • HugoJesus's avatar
      HugoJesus
      Icon for Helper IV rankHelper IV

      ToddChitt Thanks a lot for your answer.
      But, I've alreadry tried before and doesn't work. Sorry
      I've change the body of my topic, to clarify my doubts, and please click in the link and download the PBIX Example to understand what I'm dealing off.

  • Hey JarroVGIT ,

    I saw one of your comments in a Topic, saying " looooove ranking questions".

     

    How can you help me out of this?

     

    Best Regards, 

    Hugo Jesus

  • Hi HugoJesus ,

     

    If you apply the filer on the page level, the data will be filtered on this report page. In this condition, after you applied the filter Hotel = 2 , the sum value will be like this:

    If you do not want the result be changed by the filter, consider using calculated column like RANK_TAB, instead of using measure.

     

    Best Regards,

    Jianbo Li

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