Forum Discussion

CathyPulido's avatar
CathyPulido
Copper Contributor
Oct 11, 2020
Solved

Power Query merging query creating duplicate rows

I've successfully merged tables and data integrity has remain stable until my last query merge step.  In some instances it has duplicated or tripled the line data and I don't know why.  Does someone ...
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Oct 13, 2023

    adrianmihaita Your query merges the two other based on License ID alone. Since you have 13 periods (Year-Month) for each license, PQ will create 13 X 13 = 169 rows for each one. You need to base the merge (LeftOuter) on Licence ID, Year and Month.

     

    First select License ID in both left and right, then press and hold Ctrl and select Year in both and then Month in both. LeftOuter and OK. Expand the relevant columns from the merged tables and you get the billing report, one row for each license, year and month. Thus, 13 rows for each license.

     

Resources