Forum Discussion

TriveniN's avatar
TriveniN
Helper II
3 years ago

How to create rank

Hi,

mcaraballo Can you help me to create rank

 

Note: OccupiedRent and DateDiff are the measures

Below is the sample data

NAMEOccupiedRentDateDiff
ATL00001 - Davina Roberts - LE22550 
ATL00089 - Marion Houston - LE12050 
ATL00089 - Marion Houston - LE122500
ATL00096 - Nicholas M. Guerra - LE11900 
ATL00096 - Nicholas M. Guerra - LE121000

Expected Output:

NAMEOccupiedRentDateDiffRank
ATL00001 - Davina Roberts - LE22550 1
ATL00089 - Marion Houston - LE1225001
ATL00089 - Marion Houston - LE12050 2
ATL00096 - Nicholas M. Guerra - LE1210001
ATL00096 - Nicholas M. Guerra - LE11900 2

4 Replies

  • Hi TriveniN , hope you are doing well.

     

    I created a table with the sample data and then I created this column:

    Columna = RANKX(filter(tabla, Tabla[NAME] = EARLIER(Tabla[NAME]) ), Tabla[OccupiedRent], , DESC,Dense)
     

    Please try this.

    Regards,
    Mariano.
    Please, visit this idea and vote it if you like it ! Ability to show/hide any object based on a conditi... - Microsoft Fabric Community

     

    DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO!

    • TriveniN's avatar
      TriveniN
      Helper II

      Ahmedx : Thanks for quick response

       

      getting an error when we create above column 

       

      Can you help me out to resolve issue

       

      error details is circualr dependency was detected

       

      Expected Output should be below

      NAMEOccupiedRentDateDiffRank
      ATL00001 - Davina Roberts - LE22550 1
      ATL00089 - Marion Houston - LE1225001
      ATL00089 - Marion Houston - LE12050 2
      ATL00096 - Nicholas M. Guerra - LE1210001
      ATL00096 - Nicholas M. Guerra - LE11900 2