Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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))
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.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
9 |