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
Variable Library: Disable default value set.
The Default Value Set in the Variable Library poses a risk. The Default Value Set will silently apply values when no explicit value set has been selected for a Test or Prod workspace. There i...frithjof_v6 hours agoCommunity ChampionNew634Views17likes2CommentsScheduled Refresh for Fabric Mirroring
Current Challenge: Fabric Mirroring runs continuously, leading to unnecessary data replication and higher Snowflake costs. There is no built-in option to schedule mirroring based on specific times o...ram_eternal1898 hours agoRegular VisitorNeeds Votes472Views3likes2CommentsMake workspace and item session persistence optional
Description The new persistent session behavior in Microsoft Fabric should be optional rather than forced. Currently, Fabric remembers the workspaces and items that were open in my previous session...TeemuMultanen9 hours agoAdvocate INew268Views42likes1CommentWhy are Calculation Groups so hard to modify?
Is there a way to make it easier to modify the DAX in a calculation group? I'm not sure if it's just me that finds this so annoying, but perhaps it's because I just started using calculation groups. ...AaronReasoner10 hours agoNew MemberNew9Views0likes0CommentsFeature Request: Add a Warning Prompt Before Deleting Tables That Contain Measures
Problem Statement: In Power BI, measures are linked to specific tables. When a developer deletes a table from the model view or report view, Power BI automatically deletes all measures assigned to ...Murtaza_Ghafoor13 hours agoSuper UserNew17Views2likes0Comments