Forum Discussion

matheus_peppers's avatar
matheus_peppers
Frequent Visitor
3 years ago
Solved

How to make RANKX ignore column rows containing certain strings?

Hello, how are you? I am creating a RANKX function, where it brings me the ranking of cities that had the most ad reach, however, I want in this function, to make RANKX not consider the lines that a...
  • johnt75's avatar
    3 years ago

    You could try something like

    FB Ranking =
    VAR CitiesToIgnore = { "Unidentified City in Vale do Paraíba" }
    VAR CitiesToRank =
        EXCEPT ( ALL ( dFacebook_AdSets[City] ), CitiesToIgnore )
    RETURN
        RANKX ( CitiesToRank, [FB - TOTAL Reach] )
    

    Just add more entries into the CitiesToIgnore variable