web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Chat from PowerBI via ...
Power Apps
Unanswered

Chat from PowerBI via Powerapps with ChatGPT - JSON string/number Issue

(0) ShareShare
ReportReport
Posted on by 3

Hi All

The outcome of this is a Customizable table in my PowerBI model and a PowerApp in the same model that is basically a question and answer with a button so that you can query your data via ChatGPT.

The user types the question, and the button then sends the data table (as a json) and question to ChatGPT via PowerAutomate and OpenAI API. This works perfectly when testing in the PowerApp workspace.

However I get a JSON parsing error ("JSON parsing error, expected 'number' but got 'string'.")when I do the exact same from PowerBI and the data contains a blank

 
BIDev123_4-1691827173618.png

 

 

The PowerApp simply converts the table data from the "powerbiintgration.data" to a JSON using the JSON function in powerapps. e.g SET(MyJSONVariable, JSON(powerbiintgration.data)). This can then be sent to OpenAI API via powerautomate

 

BIDev123_2-1691827111045.png

Some notes:

  1. When including multiple measure and dimensions there will always be blanks and converting "0" is not practical.

  2. The column names are dynamic, and change based on user selection

  3. I have noticed the powerbi intgration does not pick up columns that where not originally included when creating or updating the app. This is also a issue.

Any help on this would be appreciated.

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard