Forum Discussion
reuse query steps
- 10 years ago
Dragon1 If spreadsheet is going to have same number of columns and names just with poor data each time then in power bi desktop you can go to query editor, right click your original query and make duplicate of it. Then simply click on setting icon next to Source (first step in query) and point it to your new spreadsheet and click Refresh. This will repeat all those steps you applied previously. As said earlier if metadata of your spreadsheet hasn't changed but only data needs cleaning.
Hi guys,
I know, I am very late to this party, but I'd like to offer another approach on this topic. You could outsource your M code transformations into functions and then use those to run against any target table. I happened to have written an article about this, where you first define your functions and then populate a configuration table specifying where you wanna apply those functions to. Finally a Data Quality Check / Cleaning function leverages the previous information to do the cleansing. It's a very scalable approach since the logic is decoupled and can be reused easily as many times as you want. The blog article can be found here.
Hope this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/