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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors