Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi!
We've discover the concept of UDFs and would very much like to use it. However I don't see any way of updating the semantic model with the code like I see in the demos.
We're working in desktop towards a semantic model in Fabric, using direct lake. Is this functionality not yet released for those models or for direct lake?
If not, do we have any idea of when it will be released?
Thanks,
Stefan
Solved! Go to Solution.
Hi @Steeks91 ,
To my test this works correctly in the Direct Lake mode, in my case it asked me to do an updagrade of the compatability level of the semantic model but implemented the new logic.
It's still on preview but it's usable. How are you creating the function using the TMDL script or the DAX editor?
To generate the function you need to do it on the TMDL script, I have seen some problems using the DAX editor.
My general code is:
createOrReplace
/// Optional description above the function
function Test =
( a: expr, b: int64 ) =>
a+b
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Steeks91 ,
To my test this works correctly in the Direct Lake mode, in my case it asked me to do an updagrade of the compatability level of the semantic model but implemented the new logic.
It's still on preview but it's usable. How are you creating the function using the TMDL script or the DAX editor?
To generate the function you need to do it on the TMDL script, I have seen some problems using the DAX editor.
My general code is:
createOrReplace
/// Optional description above the function
function Test =
( a: expr, b: int64 ) =>
a+b
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsAmazing - you're a genius! Thank you very much!
I was using DAX editor.
When using TMDL I just got this message, but after accepting it worked. When editing in desktop mode it works. However, when looking at the semantic model in the browser I don't see "funtions". I don't mind but just a FYI if someone else sees this.
Thanks @MFelix !!
Hi @Steeks91 ,
This feature is still under developement so it does not show in the service that is correct and even more if you add a measure with that UDF it will return error:
However it works properly and you can use it to add measures to your semantic model, just be aware that since you are in Direct Lake mode the use of UDF need to be done at semantic model level you cannot use it in Report Measures.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!