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
Set default x axis scrolling position
Enable selection of the default scroll position for the x-axis on a chart. For example, on a line chart with dates as the x-axis, when not all of the data can display in the view at once, the scroll...Lisa_Krieg3 hours agoNew MemberNeeds Votes7.8KViews1154likes104CommentsTable Visual — Rounded Corners and Pill-Style Cell Backgrounds
Add the option to display cell background colors as rounded rectangles or pill-shaped labels within the native Table visual. Currently, applying a background color fills the entire cell with a solid...urawizardharry4 hours agoRegular VisitorNew9Views0likes0CommentsAdd Global Alignment Controls for Power BI Matrix Values and Headers
Please add a global alignment setting for Matrix visuals that allows users to apply the same alignment, left, center, or right, to all measure columns at once. This should apply to column headers, d...AaronReasoner5 hours agoNew MemberNew3Views0likes0CommentsCase sensitive-insensitive option in Power BI
There should be an option in Power BI for the data in the columns to be either case sensitive or insensitive. When one deals with data involving client names or entity names, case sensitivity-sinsens...sohail_syed_moh5 hours agoNew MemberNeeds Votes2.3KViews124likes11CommentsGoverned & Regulation for Publish to Web feature
Notifying certain group of individuals if there is any enhancements performed on the semantic model which already hold an active Publish to Web code in place. This ensure in having more security and...Jaswanth_UNHCR5 hours agoNew MemberNew3Views0likes0Comments