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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.