Forum Discussion

Steeks91's avatar
Steeks91
New Member
10 months ago
Solved

UDF (User Defined Functions) in semantic model in Fabric?

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 deskto...
  • MFelix's avatar
    10 months ago

    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