Forum Discussion
pawelj795
Post Prodigy
5 years agoRemove duplicates with grouping by, leave most recent value
Hi, I'm currently working on filtering out old BOM's which my company replaced with new ones. Below, there is a table with BOM lines. The same BOM always has the same parent_product_tmpl_i...
- 5 years ago
Hi pawelj795
Download example PBIX file and data
I'm not sure I've followed your logic totally as I end up with a LOT of rows for each parent_product_tmpl_id.
But according to what you've described I soudl be grouping on the parent_product_tmpl_id field and not the bom_id field.
In my file above, check the Merge1 query for this results table. I had to recreate your data from your tables in the Data Model as I couldn't open your query and access your SQL source. The data is with the PBIX file above.
Regards
Phil
pawelj795
Post Prodigy
5 years agoThanks, but I don't see your file
PhilipTreacy
Super User
5 years agopawelj795 Sorry, try again, I had to update the link.
https://d13ot9o61jdzpp.cloudfront.net/files/pbiforum/pawel.zip
Phil