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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.