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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Adding new query

Hi. I have a school report with several queries coming from a power BI connector and I just created a new one with reading data coming from a local excel spreadsheet. I have pupils names on this excel spreadsheet but I need to allocate the unique ID numbers so that I can have a relationship with other data. Any suggestions of how can I automatically allocate the ID's to the pupils? I have other queries where I have pupil's name and Unique pupils ID.

 

Thanks 

1 ACCEPTED SOLUTION
tackytechtom
Most Valuable Professional
Most Valuable Professional

Hii @Anonymous,

 

Technically it should be possible to join in one of the other tables (that have both name and ID, preferably the pupil master table) via the name attribute. Then, you can use the ID and populate a new column. 

 

This approach is problematic though. If there are pupils with the same name, you will end up with duplicates since the join finds two rows for that.

 

Generally, you should fix that in the source. You have the ID columns as unique keys, so for your data model to work, you should also use them.

 

I know, this is easier said than done, especially when there are coming spreadsheets from left and right that do not use the IDs.

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

1 REPLY 1
tackytechtom
Most Valuable Professional
Most Valuable Professional

Hii @Anonymous,

 

Technically it should be possible to join in one of the other tables (that have both name and ID, preferably the pupil master table) via the name attribute. Then, you can use the ID and populate a new column. 

 

This approach is problematic though. If there are pupils with the same name, you will end up with duplicates since the join finds two rows for that.

 

Generally, you should fix that in the source. You have the ID columns as unique keys, so for your data model to work, you should also use them.

 

I know, this is easier said than done, especially when there are coming spreadsheets from left and right that do not use the IDs.

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.