Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mina97
Helper III
Helper III

unique name values based on phone number

Hey ihave the following data 

First Namelast nameemaildegreepayment ID
jackEden Eden exapmle.combachelor250$2160003021
loraTeigen Teigen example.combachelor3403160003021
jackEdinEden1exapmle.combachelor600$5160003021
jackEden Eden1exapmle.combachelor500$5160003021

 

how can i assign uniqe ID to the most frequent first name

because i have a lot of misspelled names and i want to unifiedthem
i wrote the following dax column but it i do not know how to add the most frequent first name part

name unique = 
VAR same_names =
    CALCULATETABLE (
        SUMMARIZE ( 'Table1 (2)', 'Table1 (2)'[ID], 'Table1 (2)'[First Name] ),
        ALLEXCEPT ( 'Table1 (2)', 'Table1 (2)'[First Name] )
    )
VAR ranking = RANKX ( same_names, 'Table1 (2)'[ID],, ASC, DENSE )
VAR blanks = REPT ( UNICHAR ( 8204 ), ranking - 1 )
VAR res = 'Table1 (2)'[First Name] & blanks
RETURN
    res

 

Please HELP and THANK YOU

1 REPLY 1
lbendlin
Super User
Super User

Instead of ranking by ID ascending, rank by first name descending and grab the entry with rank 1

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.