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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Alexjaco2
New Member

Merging two data sets based on ordered data sequence

Hi, 

 

I would like to merge two data sets into a new dataset based on a squence of numbers and the overall category, however that squence is often out of order between the two datasets. Is there a query to fix this? Underneath is a sample of that data where Category 1 and Squence 1 represents columns in the first dataset and Category 2 and Squence 2 represents columnd in the second data set. The last table is the destired outcome. 

Category 1Squence 1
Name1G0463
Name2 G0463
Name3G0463
Name197110
Name4G0463
Name2 97110
Name397110
Name380050;80061;83036;84153;81003
Name190686;90471
Name173030

 

Category 2Squence 2
Name1G0463
Name2 G0463
Name3G0463
Name197110
Name4G0463
Name4 97110
Name397110
Name380061;83036;84153;81003;80050
Name190686;90471
Name2 73030

 

Category WantSquence Want
Name1G0463
Name2 G0463
Name3G0463
Name197110
Name4G0463
Name397110
Name190686;90471
Name380050;80061;83036;84153;81003
7 REPLIES 7
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

 

Appologies, the Sequence:

Name380050;80061;83036;84153;81003

 

Should also come up as a match even though it's out of order in the seccond table. 

pls try this

 

That worked! Is there a way to bring in the squence from table 1? 

 

Thank you for your help. 

pls try

 

Thank you! I was looking for somthing more like this where the squence values from both table are in either of of the tables or a new table. Looking somthing like this. 

Category WantSquence 1Squence 2
Name1G0463G0463
Name2 G0463G0463
Name3G0463G0463
Name19711097110
Name4G0463G0463
Name39711097110
Name190686;9047190686;90471
Name380050;80061;83036;84153;8100380061;83036;84153;81003; 80050

pls try this

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.