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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mushwar
Regular Visitor

How to get a unique number for a group of duplicates in a list?

Hi all, I'm working on a org.chart and I've gotten my hands on a csv extraction from our AD servers. I've gotten all the names, accountnames, relations between bosses and employees and such. Though for my organisation tree to work I need to have each group of NAME? to be assigned a unique number. For example 10xNAMEy=nr1 and 15xNAMEz=nr2 and so on. 

 

Basically in this list of hundreds and hundres of rows, each employee is unique but they share managers, therefore I need these groups of managers to be assigned a number so I can map these groups in a org.tree visual. 

 

Does any of this make any sense? English isn't my first language and I'm new to PowerBI so I doesn't fully grasp the lingo yet. 

1 ACCEPTED SOLUTION
RobbeVL
Impactful Individual
Impactful Individual

Hi,
If you need a unique Identifier, the most usefull way would be to paste together a range of columns, that together make a Unique Key. this way the key is also readable. 

Alternatively, you could just add an Index column in PowerQuery. 

 

FYI, it is also possible to directly connect to your Active user directory with Power BI, this might be usefull when you want your report to dynamically change to the actual state of the company.

 

Regards,

 

Robbe

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Mushwar ,

 

You could use RANKX() function to create unique numbers based on name column.

You could share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to OneDrive and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
vivran22
Community Champion
Community Champion

Hello,

Is it possible to share sample data and the desired output required?

Regards,
Vivek
MariusT
Helper II
Helper II

You can remove duplicates in the query editor, and then add an index, but I am not sure if this is the most correct way to solve your problem.

 

Would it be possible for you to provide som sample data?

RobbeVL
Impactful Individual
Impactful Individual

Hi,
If you need a unique Identifier, the most usefull way would be to paste together a range of columns, that together make a Unique Key. this way the key is also readable. 

Alternatively, you could just add an Index column in PowerQuery. 

 

FYI, it is also possible to directly connect to your Active user directory with Power BI, this might be usefull when you want your report to dynamically change to the actual state of the company.

 

Regards,

 

Robbe

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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