Forum Discussion

TK12345's avatar
TK12345
Icon for Resolver II rankResolver II
4 years ago
Solved

RANKX with repeated values

Hi there, I am struggeling with the RankX function, I would like to see in how many countries different employees have worked, based on Month/Year, so I can filter on Month Year. As you c...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi TK12345 ,

    I have updated your sample pbix file(see attachment), please check whether that is what you want.  You can create a calculated column as below:

    New_Countries worked in = 
    CALCULATE (
        DISTINCTCOUNT ( 'Blad1'[Country-legal] ),
        FILTER (
            ALLEXCEPT ( 'Blad1', 'Blad1'[Employee] ),
            'Blad1'[Month/Year] <= EARLIER ( 'Blad1'[Month/Year] )
        )
    )

    Best Regards