Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jellis1971
Helper IV
Helper IV

Power BI Desktop Won't Find Function

I have successfully created a ChatGPT function in Power Query Editor called getChatGPTResponse.

But, the Measure that I'm trying to use in the Power BI Desktop doesn't see my getChatGPTResponse function.

Below is the measure.

Why can Power BI Desktop not find the function?

 

ChatGPTResponse = VAR SelectedMessage = SELECTEDVALUE(UserInput[UserInput]) RETURN IF(ISBLANK(SelectedMessage), BLANK(), getChatGPTResponse(SelectedMessage))

 

  

2 REPLIES 2
jellis1971
Helper IV
Helper IV

Would you please provide specific steps on the following suggestion that you made?

...use the function in the Power Query editor to create a new column that stores the result of the function for each row of data.

Anonymous
Not applicable

Hi @jellis1971 

 

DAX measures cannot directly call or recognize M functions created in the Power Query editor.

 

That's why Power BI Desktop can't find the function when trying to use it in a DAX measures.

 

You may consider the following actions:

 

Before loading the data into the model, use the function in the Power Query editor to create a new column that stores the result of the function for each row of data.

 

After you apply the function and add the new column containing the results, load the transformed data into Power BI Desktop.

 

Once the data contains the results of the function, you can create DAX measures that operate on this data as needed.

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.