Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
Hi
I'm trying to use the 'Invoke Custom Function' to populate a new column in a query. The function requires a date parameter to be passed and a financial period is returned.
I've imported the function from a SQL Server database and tested it by passing in date from the selection calendar and the function returns the financial period as expected. When I 'Invoke Custom Function' to add a column and pass in the parameter, changing the parameter setting from 'date/time' to 'Column Name' and selecting my date column, the step completes but it returns errors with the following message;
Does anyone have any ideas about getting around this?
Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous
It looks like your Period column is of type date and needs to be converted to datetime, which is the type the function expects
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
 
					
				
		
Hi @AlB
Thanks for the response but the value being passed is DateTime and the result (Period) is Int.
I'm still struggling to resolve this, any ideas?
Regards
I found the solution. The parameter needs to be DateTime and not just Date.
Hi @Anonymous
It looks like your Period column is of type date and needs to be converted to datetime, which is the type the function expects
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
