I'd like to be able to create reusable functions in DAX, instead of using the same DAX code in multiple measures. Example: I have some complicated DAX code, which calculates the no of working seconds between two date-times. This excludes holidays, weekends, and only counts seconds from the start of the work-day, to the end of the work-day. I use this DAX code a lot, for many measures which need to be in "Working Time" (working hours/minutes). I would love to not have to copy-paste a bunch of code into all of my measures, but to be able to create a reusable function instead.
64 Comments
- jacob_walkerNew MemberIt seems a no-brainer to have this capability, and is so weird that it appears that it doesn't (I've been trying to find a way of doing it for a bit now!). If DAX could have UDFs, it would be possible to start to build a library of data analysis functions that could rival R for data science applications. But without this expandability, it is not in as competitive of a position.
- schanulekeAdvocate IYes, we absolutely need this.
- amanlamNew MemberUDF is a basic concept of any programming language
- tmckenzie3New MemberCompletely agree. This would save so much development effort!!!
- jekygNew MemberAgree ! basic and super powerful. PBI TEAM - pls. add this
- neil_macmullen1New MemberSomewhat flabbergasted that this doesn't appear to be supported.
- rahulpawar1212New MemberYes that is required
- fbcideas_migusrNew MemberCode reuse is basic
- b2218281New MemberCopy-paste waste my time and it's hard to maintain a bunch of duplicate dax code.
- roy_wellsNew MemberYes to this. Huge issue on large models with many similar complex measures
Recent ideas
Allow calls of Fabric SQL Database stored procedures from Data Warehouse
It would be great if there were a possibility to call a SQL Database stored procedures directly from a Data Warehouse stored procedures. A use case for this would be e.g. logging activities and even...Vojtech_Dolejsi1 hour agoNew MemberUnder Review2.9KViews13likes2CommentsPower BI - Org apps and cross-report drillthrough
This idea is a request to provide cross-report drill-through capability for org apps. This means being able to navigate between reports hosted in different org apps. The following sections detail why...TomMartens3 hours agoSuper UserNew1.3KViews24likes3CommentsMatrix Visual Missing Horizontal Scrollbar When Using Multiple Row Fields
Hello Power BI Team, I would like to report what appears to be a limitation or usability issue with the Matrix visual. I am using a Matrix with a large number of fields placed in the Rows section (...MERTARSLAN643 hours agoNew MemberNew5Views0likes0CommentsRead SAS files in the sas7bdat data format
In context of Clinical Development in Pharma, SAS is very much used for statistical analysis and preparation of datasets for submission. The submission datasets with the final results of a clinical ...holger_schimans3 hours agoNew MemberNew941Views2likes3Comments