Omaer Khan on 01 Mar 2017 02:06:50
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.
- Comments (59)
- Merged Idea (1)
RE: Custom (Reusable) DAX Function
Copy-paste waste my time and it's hard to maintain a bunch of duplicate dax code.
RE: Custom (Reusable) DAX Function
Code reuse is basic
RE: Custom (Reusable) DAX Function
Yes that is required
RE: Custom (Reusable) DAX Function
Somewhat flabbergasted that this doesn't appear to be supported.
RE: Custom (Reusable) DAX Function
Agree !
basic and super powerful.
PBI TEAM - pls. add this
RE: Custom (Reusable) DAX Function
Completely agree. This would save so much development effort!!!
RE: Custom (Reusable) DAX Function
UDF is a basic concept of any programming language
RE: Custom (Reusable) DAX Function
Yes, we absolutely need this.
RE: Custom (Reusable) DAX Function
It 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.