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
Anonymous
Not applicable

Index Column and Merge Issue

Hello everyone,

 

I have been using Power Query to transform a single table held in SQL into a dimensional model. It works as follows:

 

1. Single table in SQL server which holds the entire dataset. ~ 2.5 million rows. 

2. One query in Power Query which connects to this table, performs steps to remove unnecessary columns, de-duplicate the data and add an index column. This forms a dimension.

3. One query in Power Query which connects to this table, does a merge to the newly created dimension table on the fields held within the dimension to go and get the index columm. The merge makes a perfect match each time. 

4. In the model view the two tables are joined by the index column in the relationship. 

 

When refreshing the dataset the numbers being shown keep changing; sometimes they are right, sometimes they are wrong. It appears the index column is not being passed correctly over from the dimension to the fact in the merge when it refreshes. In Power Query everything looks fine. Interestingly It is only ever the index that is wrong. If I merge back any of the dimensional columns back into the fact, and keep the original columns insde the fact they all match. It is only ever the index that is incorrect.

 

Refresh 1:

Refresh1.PNG 

Refresh 2:
Refresh 2.PNG

 

 

 

 

 

 

 

 

 

Refresh 3:

 

Refresh 3.PNG

 

Has anyone ever encountered this before and any tips for why it is happening / how to stop it happening? The above method seems pretty standard way of creating a dimensional model from a single table so unsure why this would be happening. 

 

Any help is much appreicated.

 

Thanks,

 

Alex

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found adding an explicit sort step in Power Query after doing the de-duplication fixed the issue. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

I found adding an explicit sort step in Power Query after doing the de-duplication fixed the issue. 

jennratten
Super User
Super User

Hello - can you please post your m-queries?

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.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.