Do you want to implement certain business logic in multiple measures or calculated columns in your semantic model and maintain that logic in one place?
With User Defined Functions in Power BI you can do just that. Your own custom functions, reusable across the entire Power BI Semantic Model in measures and calculated columns.
It’s here since the september update.
Some additional reading material regarding user defined functions:
https://powerbi.microsoft.com/en-us/blog/power-bi-september-2025-feature-summary/#post-30998-_Toc208591574
https://www.sqlbi.com/articles/introducing-user-defined-functions-in-dax