r/ExcelPowerQuery • • Sep 30 '24

Performance issue with nested merges

I work in accounts receivable.

My current task is to take a medium size dataset (around 100k rows of data) and do matching of debit and credit based on values, account numbers etc. The problem is that I do multiple types of matching from the same dataset and I keep duplicating the queries to then filter out the matched values from other queries. After the 4th nested query the loading time is largely increased. Does anyone have an idea of how to speed things up?

High level overview: - load excel file to PQ - do some transformations - referece query, find first match with inner - merge as new original dataset with the matches -reference again -repeat this process for each rule

I've looked a bit into DAX and I'm thinking maybe loading to data model and use DAX would be faster but so far I've only seen tutorials which replace the vlookup function, any input would be appreciated!

4 Upvotes

5 comments sorted by

View all comments

Show parent comment

2

u/TashHadji Sep 30 '24

That sounds like a lot of work.

Have you tried grouping your credit transactions by invoice number, clients & sum of the value before merging?

Are you on linkedIn?

We normally have daily Excel & Power query challenges and that sounds like a good challenge for the experts who submit their results daily.

From the solutions posted there you can pick your best and adopt.