Forum Discussion

UncleLewis's avatar
UncleLewis
Icon for Responsive Resident rankResponsive Resident
1 year ago
Solved

Dim Table Returns Null On Merge Where ID is Expected.

Hi all,

 

Using PBID March 2025.

I am importing sales rep names from multiple sources, append together, delete duplicates and create an index 1.
I then tried to merge to the sales fact table based on the name and then expand to the id - they all return null.
The data is proprietary so I cannot post it.

 

I re-created with fake data, followed all same steps and it returns the id where I expect it to and returns null where I don't have a sales rep name all as expected.

 

Any thoughts what could be going on in my production pbix vs fake pbix?

The sample pbix uses fake data to try to replicate the issue - but in the sample, everything working as I expect. That is not the case in the production pbix. Cant figure out what I am misssiing. Checked data type between dim and fact table fields - both are text.

 

Thanks

w

Sample pbix 

 

 

 

 

 

 

  • Hi UncleLewis ,
    Thanks for using Microsoft Fabric Community.
    Just wanted to check if your query is resolved and the helpful suggestions from danextian and Sonalika were useful to resolve your query.
    If you are still experiencing issues, please consider the following:

    As mentioned by danextian  and Sonalika , handling invisible characters, case, and ensuring proper step order are critical.

    In addition to that, a few more things to check:

    • If you're using an Index column after deduplication, make sure you're not merging on a version of the table before the index was created or deduplicated. You can verify this by stepping through the Applied Steps and ensuring the merge uses the final version of the dimension table.

    • Sometimes, Power BI shows merged results as null due to cached previews, especially after changes. Try refreshing the preview or doing a full refresh of the data model.

    • If you've merged but also have a relationship between the same tables in the model, it might interfere with expected results when expanding. Temporarily remove any relationship and re-test the merge logic in Power Query alone.

    Hope this helps. Please reach out for further assistance.

    Please consider marking the helpful reply as Accepted Solution to assist others with similar issues.

6 Replies

  • Sonalika's avatar
    Sonalika
    Regular Visitor

    UncleLewis 

    Hi!

    If a merge returns nulls despite matching logic, check for hidden whitespaces, case sensitivity (Power BI joins are case-sensitive), and inconsistent data types (force both to Text). Use Text.Trim, Text.Clean, and Text.Upper in Power Query to normalize values before merging. Also verify that your sales rep table is truly deduplicated and that you're using the correct join type (e.g., Left Outer). Step order in Power Query matters too—apply transformations before the merge.

     

    Give a Thumbs Up,If it was helpful ! 

  • hi UncleLewis 

    There may be invisible characters before and/or after from either of the columns being  joined so you might want to do a Text.Trim or Text.Clean before merging. Also, we don't have access to your data source so we can't see what's actually happening in your query. You al so removed the Sales Rep column so we can't even compare the columns loaded.

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Icon for Community Support rankCommunity Support

    Hi UncleLewis ,
    Thanks for using Microsoft Fabric Community.
    Just wanted to check if your query is resolved and the helpful suggestions from danextian and Sonalika were useful to resolve your query.
    If you are still experiencing issues, please consider the following:

    As mentioned by danextian  and Sonalika , handling invisible characters, case, and ensuring proper step order are critical.

    In addition to that, a few more things to check:

    • If you're using an Index column after deduplication, make sure you're not merging on a version of the table before the index was created or deduplicated. You can verify this by stepping through the Applied Steps and ensuring the merge uses the final version of the dimension table.

    • Sometimes, Power BI shows merged results as null due to cached previews, especially after changes. Try refreshing the preview or doing a full refresh of the data model.

    • If you've merged but also have a relationship between the same tables in the model, it might interfere with expected results when expanding. Temporarily remove any relationship and re-test the merge logic in Power Query alone.

    Hope this helps. Please reach out for further assistance.

    Please consider marking the helpful reply as Accepted Solution to assist others with similar issues.

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Icon for Community Support rankCommunity Support

    Hi UncleLewis ,

    Just checking in to see if you query is resolved and if any responses were helpful. If so, kindly consider marking the helpful reply as 'Accepted Solution' to help others with similar queries. 

    Otherwise, feel free to reach out for further assistance.

    Thank you.

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Icon for Community Support rankCommunity Support

    Hi UncleLewis ,

    Following up to see if your query has been resolved. If any of the responses helped, please consider marking the helpful reply as the 'Accepted Solution' to assist others with similar questions.

    If you're still facing issues, feel free to reach out.

    Thank you.

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Icon for Community Support rankCommunity Support

    Hi UncleLewis ,

    We’re following up once more regarding your query. If it has been resolved, please mark the helpful reply as the Accepted Solution to assist others facing similar challenges.

    If you still need assistance, please let us know.
    Thank you.