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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.