Forum Discussion

johanthedataman's avatar
johanthedataman
Frequent Visitor
6 years ago
Solved

from Rankx Calculated Column to Measure

Hi guys,   I'm really struggling with the following: How can I write the following Rankx Calculated Column as a Measure?   Rank = RANKX (   FILTER (   Table,   Table[organisation_id] = EARL...
  • nandukrishnavs's avatar
    nandukrishnavs
    6 years ago

    johanthedataman 

     

    Try this

    IndexValue = SUM('Table'[Index])
    Rank = 
    var _selectedID= SELECTEDVALUE('Table'[organisation_id])
    var _rank=RANKX(FILTER(ALL('Table'),'Table'[organisation_id]=_selectedID),[IndexValue])
    return _rank



    Did I answer your question? Mark my post as a solution!
    Appreciate with a kudos
    🙂

  • nandukrishnavs's avatar
    nandukrishnavs
    6 years ago

    johanthedataman 

     

    Try this

    IndexValue = SUM('Table'[Index])
    Rank = 
    var _selectedID= SELECTEDVALUE('Table'[organisation_id])
    var _rank=RANKX(FILTER(ALL('Table'),'Table'[organisation_id]=_selectedID),[IndexValue],,ASC)
    return _rank



    Did I answer your question? Mark my post as a solution!
    Appreciate with a kudos
    🙂