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.
- schanuleke
Advocate I
Yes, 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
Justification Prompts When Downgrading or Removing Sensitivity Labels in Power BI Desktop
Description Currently, organizations can configure Microsoft Purview sensitivity label policies to require users to provide a justification when removing a label or lowering its classification. T...vvargasv11 hours agoMicrosoft EmployeeNew11Views0likes0CommentsVisual Type Defaults in Visualization Pane
This would change my life with fussy clients and client/public facing apps. In addition, it would allow me to add more value to the clients on retainers who do not have the 'hours' to allocate to...IolaWhiteley13 hours agoAdvocate IINew48Views7likes0CommentsMatrix: column totals as a bar chart docked to the edge
What's missing Data bars already work on the Total row and column through conditional formatting, so row totals can be read as length. Column totals cannot: they render as a horizontal bar inside a ...Sayurivalente13 hours agoRegular VisitorNew79Views6likes1CommentAllow Bookmarks to Affect Multiple Report Pages
Description: I would like to request the ability for a single Power BI bookmark to affect and maintain a state across multiple report pages, rather than being limited to a single page. For example,...Josegonzalez2113 hours agoNew MemberNew20Views4likes1CommentFeature Proposal: Expandable/Collapsible Page Sections for Reports on Same Semantic Model
Subject: Feature Proposal: Expandable/Collapsible Page Sections for Reports Using the Same Semantic Model Dear Microsoft Power BI Team, I would like to propose an enhancement to the Power BI report...Dr7awb13 hours agoNew MemberNew32Views1like1Comment