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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
satishkurra
Frequent Visitor

Generate UniqueID column based on 2 existing columns

Hi

 

Below is the snapshot of sample data. I need to generate distinct/unique ID column (this will be a new column in the same table) based on the 2 columns storeID and productID.

 

I'm trying to do this in power query edit mode.

 

Request to please help on the same.

 

Thanks

UniqueID.png

6 REPLIES 6
Anonymous
Not applicable

Hi @satishkurra 

What is the expected results?
Can you provide some examples?

Ta

Thanks for responding.

 

Expected output attachedOutput.png

Anonymous
Not applicable

So,

It is a random number?

How about adding an index column?
https://youtu.be/hhZ04by1UuQ

 

 

Index will add unique record for all rows.

 

I need unique id column based on unique values from both storeid and productid

Anonymous
Not applicable

Sorry,

But according to your example these are just random numbers.

Provide more sample data so we can better understand the expected outcome.

 

Hi

 

These are not just random numbers. It created unique id for Key field 1,2,3,4 for unique combination of Storeid and productid.

 

Here is the sample data. 

 

 StoreID ProductID
11
12
11
12
21
22
21

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors