Forum Discussion

Stacey_Tucker's avatar
Stacey_Tucker
Frequent Visitor
1 year ago
Solved

Merge queries only returning partial information

Hi, I am attempting to merge two tables together, but not getting the expected result.

 

Table 1 

Table 2

 

I am testing my query with 27 rows to figure out my issue. but in reality I have hundreds of group Ids per Date Extract, I havelooked and the same issue is happening with multiple group Ids.

 

The merge tells me I have 27 of 27 rows matching 

 

 

I have trimmed the text incase there were any spaces caucing an issue with my data.

I am getting the expected output for some of my rows, but then the remainder becom null. The Date SD update should be filled out for all date.

 

 

Please offer any advise as I am stumped.

 

Thanks

  • Thank you for the suggestions and responses, unfortuently these did not resolve our issue, it appeared that when we were merging our data it wasn't importing all of the data even though it was demonstrating a perfect match and all possible causes for difference had been removed, to get around this my manager has completed a significant rebuild on our query as we had it broken up into different steps into smaller query tables. She has worked around the issue and we are back up and running.

8 Replies

  • Hi Stacey_Tucker ,

     

    On your 27-row sample tables, can you add a query step to each that converts [GroupId] to number type BEFORE the merge step please? I understand this may not be appropriate for the entire dataset but, for the purposes of testing, this should ensure a perfect match between the respective [GroupId] columns.

     

    If that still doen't work, please do the following to provide data that I can use to try and replicate the issue:

    -1- Remove all columns except [Date Extract] and [GroupId] from Table1, and [Date Extract], [GroupId], and [Date SD Update] from Table2.

    -2- Select Table1, do Ctrl+A to select the entire table, go to the Home tab > Enter Data. Paste the table in here. Hit OK then go to Home > Advanced Editor. Copy ALL of the M Code there and paste into a code window ( </> button above) here.

    -3- Repeat step -2- for Table2.

     

    Pete

  • You should know that the datetime type cannot fully display values ​​less than 1 second, such as: 2018-04-21T00:00:00.0010000, unless you click on this value in the preview interface to see the real value.

    In short: unless necessary, please use the date type instead of the datetime type.

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi Stacey_Tucker,

     

    Thank you for being a part of the Microsoft Fabric Community.

     

    As ZhangKun ans BA_Pete mentioned, those workarounds should resolve your issue.

    If you have further questions or updates, please let us know.

     

    If the answer meets your requirements, please give us Kudos and consider marking it as a solution to assist others.

     

    Best Regards,
    Sahasra.

    • v-sgandrathi's avatar
      v-sgandrathi
      Community Support

      Hi Stacey_Tucker,

       

      we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.

      If our response addressed by the community member for  your query, please mark it as Accept Answer and click Yes if you found it helpful.

      Should you have any further questions, feel free to reach out.


      Thank you for being a part of the Microsoft Fabric Community Forum!

      • v-sgandrathi's avatar
        v-sgandrathi
        Community Support

        Hi Stacey_Tucker,

         

        We wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.

        If my answer resolved your query, please mark it as "Accept Answer" and select "Yes" if it was helpful.

        If you need any further assistance, feel free to reach out.

         

        Thank you for being a part of the Microsoft Fabric Community!

         

  • Stacey_Tucker's avatar
    Stacey_Tucker
    Frequent Visitor

    Thank you for the suggestions and responses, unfortuently these did not resolve our issue, it appeared that when we were merging our data it wasn't importing all of the data even though it was demonstrating a perfect match and all possible causes for difference had been removed, to get around this my manager has completed a significant rebuild on our query as we had it broken up into different steps into smaller query tables. She has worked around the issue and we are back up and running.

    • v-sgandrathi's avatar
      v-sgandrathi
      Community Support

      Hi Stacey_Tucker,

       

      Thank you for your response! I'm glad to hear that your query has been resolved.

      Please consider marking your answer as the accepted solution to help others in the community find it more easily.

      Thank you for being a part of the Microsoft Fabric Community!




    • BA_Pete's avatar
      BA_Pete
      Super User

       

      And don't forget to give a thumbs-up to anyone that helped you (or tried, at least) along the way 🙂

       

      Pete