Forum Discussion
renee_crozier
Sep 29, 2025Brass Contributor
Combine Similar Matching Rows Into One and Add Column Using Power Query
I have two data sources (XLSX and CSV) that have been loaded into Power Query, had transformations applied to them, and then merged based on the Asset and Path columns. Asset and Hits are a part of t...
Kidd_Ip
Sep 30, 2025MVP
Take this:
Step 1: Load and Clean Both Sources
- Load both CSV and XLSX into Power Query.
- Apply your existing transformations (trimming, cleaning, etc.).
Step 2: Use Fuzzy Merge
If the Asset values are similar but not identical:
- Use Fuzzy Merge between CSV and XLSX on Asset and Path.
- Enable Fuzzy Matching and adjust the similarity threshold.
- This helps match truncated or dirty Asset names.
Step 3: Group and Aggregate
- In the CSV query:
- Go to Transform > Group By
- Group by Path and a cleaned version of Asset (e.g., first 35 characters or a normalized key)
- Use Sum on Hits
- You can also create a custom grouping key:
- Text.Lower(Text.Start([Asset], 35))
This helps group similar truncated assets.
Step 4: Merge with XLSX
- Merge the grouped CSV with the XLSX query on Path.
- Expand Title and other columns as needed.
Step 5: Final Cleanup
- Remove intermediate columns (like grouping keys).
- Rename columns for clarity.
- Ensure no duplicates remain.