Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Is there a way to easily store and mantain the custom functions that I'm building?
I'm thinking on a library of "personal" M functions that I can update as needed (add new function, modify existing function) and pass from one project to another.
thank you in advance,
P.s.: Some background: I'm from VBA, I used to keep all my custom functions in some modules (each module was a theme from my library e.g.: "Strings Manipulation", "Arrays","Maths"). every time I created a new project I transferred the modules to the new workbook (with my "Transfer Library" function that transfers the modules) and I was good to go.
Solved! Go to Solution.
Hi @MrDeg ,
I think you can create report templates.
Power BI report templates contain the following information from the report from which they were generated:
Reference: Create and use report templates in Power BI Desktop
Hope to help you.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
No offense but that's an extremely poor solution. No version control, no diff, no lint, and its even a hassle for reusability. One should be able to start a blank project, import some version controlled text files and move on with their lives.
This being for M and DAX code specifically, but lets be honest, everything inside PBI is likely in some xml schema or another, there's no reason to limit code/visualization reuse to literal PBI template files. What is this, a circa 1998 excel macro library?
Hi @MrDeg ,
I think you can create report templates.
Power BI report templates contain the following information from the report from which they were generated:
Reference: Create and use report templates in Power BI Desktop
Hope to help you.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
For most of my code requirements, be it DAX, SQL or power query scripts, I use the following method which is easy to use and easy to get at:
Do the same for DAX scripts, create a folder called DAX, and save any measure or column formulas you need to refer to.
Check out the July 2025 Power BI update to learn about new features.