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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.