Forum Discussion

MylèneB's avatar
MylèneB
Icon for Helper II rankHelper II
5 years ago
Solved

Rename people based on unique ID

Hello all,   I'm struggling to do this and hope you'll enlighten me.   I want to rename people based on their unique id in our database. So if there is 2 'John Smith' with different id, I want on...
  • parry2k's avatar
    5 years ago

    MylèneB try this column

     

    Full_Name = Names[First_Name] & " "  & Names[Last_Name] )
    
    New Full Name = 
    VAR __rank = RANKX ( FILTER ( ALL ( Names ) , Names[full_Name] = EARLIER ( Names[full_Name] )  ), Names[ID], , ASC, Dense )
    RETURN
    IF ( __rank = 1, Names[full_Name], Names[full_Name] & __rank )

     

    Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.