Skip to main content
Community site session details

Community site session details

Session Id : LaqfG5sYS8Mc5/OaMsEXHf
Power Apps - Building Power Apps
Answered

"JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

Like (1) ShareShare
ReportReport
Posted on 21 Mar 2023 09:14:42 by 39

I'm new to both Power Apps and Power BI. I'm trying to do the write-back where I click on Power BI charts and it changes data in Power App and editing the data in Power Apps also saves the data back to data source.

 

Now my app is ready. In Power Apps Studio, the data shown in app changes dynamically when clicking on the Power BI report charts. This indicates that Power Apps and Power BI are connected.

 

However, in the embedded Power Apps section in Power BI report, it shows red error banner saying "JSON parsing error, expected 'number' but got 'string'." then it disappears and my Power Apps gallery doesn't show any data. I tried removing the embedded Power Apps from Power BI report and added it back again, select existing app and publish the app again, but still got the same error.

 

PitawatN_0-1679389671516.png

 

Please advise. I'm not sure if this is the error from Power Apps or Power BI or if this is the right place to ask. Thanks.

  • Negaeneyew Profile Picture
    2 on 31 Dec 2023 at 13:18:16
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report
  • navyjax2 Profile Picture
    98 on 20 Dec 2023 at 21:36:03
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    You didn't give enough information about the structure of your form & list.

    If I change a column from a String to a Currency, I get the same error onload of my form. That is whether I am filling in the field like this:

     

    txtMyFirstField.Text+txtMySecondField.Text+txtMyThirdField.Text

     

    or like this:

     

    If(IsBlank(txtMyFirstField.Text+txtMySecondField.Text+txtMyThirdField.Text), 
    0,
    txtMyFirstField.Text+txtMySecondField.Text+txtMyThirdField.Text
    )

     

    or this:

     

    If(IsBlank(Value(txtMyFirstField.Text)+Value(txtMySecondField.Text)+Value(txtMyThirdField.Text)), 
    0,
    Value(txtMyFirstField.Text)+Value(txtMySecondField.Text)+Value(txtMyThirdField.Text)
    )

     

    (You'd think with them all being the same type, no issue, right? HA.)
    What I had to do instead was:

    1. Change my Currency field where totals were going to into a String field type on the list, instead

    2. Update that same field in my Power Apps form to have a Format = Text

    3. Used this in my Default:

     

    Text(txtMyFirstField.Text+txtMySecondField.Text+txtMyThirdField.Text,"[$-en-US],$##,###.00")

     

    So it will just get set as a currency format from the value in the field, on save, from the form, itself.

    I'm thinking this HAS to be a bug within Power Apps, that we have to set the field as a String field on the list and can't write a number to a Currency field. Especially when I'm doing exactly this from user-input directly into the 3 fields I'm specifying ("My First Field", "My Second Field", "My Third Field") that are all Currency fields and take values from the user just fine. Utterly ridiculous!

  • Neethu Profile Picture
    8 on 05 Sep 2023 at 09:45:43
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    I am getting the info icon as below when just navigating to the page itself. Is there any way to resolve this.

    Neethu_0-1693906902485.png

     

  • StevenRichards Profile Picture
    152 on 23 Aug 2023 at 15:40:18
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    Sorry, no, I can't help with that.

  • Warric Profile Picture
    3 on 11 Aug 2023 at 13:05:13
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    Hi @StevenRichards , I dynamically pass my coloumns from PowerBi to Powerapps. 

    Is there any way to dynamically pass the column names to your formula, I have the column names in a collection?

    Or is their anyway to remove all blanks from a collection without using column names?

  • EddieE Profile Picture
    4,641 Moderator on 12 May 2023 at 03:08:13
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    @PitawatN 

    Thanks mate! You just saved my afternoon of Googling haha

  • StevenRichards Profile Picture
    152 on 28 Apr 2023 at 22:09:20
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    Not sure if you're still look

    Collect(
     colSparePartsList,
     {
     ContractNumber: ContractNumber.Text,
     QuantityReceived: If(
     IsBlankOrError(QuantityReceived.Text),
     0,
     Value(QuantityReceived.Text)
     ),
     QuantityRequested: QuantityRequested.Text,
     QuantityShipped: QuantityShipped.Text,
     PartsBoxNumber: PartsBoxNumber.Text,
     Description: Description.Text
     }
     )

    ing for an answer but in my case I had to collect it.

  • PitawatN Profile Picture
    39 on 24 Mar 2023 at 04:37:57
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    As I mentioned in my reply above, I had to handle all zeros and/or blank values from Power BI. So to answer your question of "where", I'd say everywhere the app is using said values.

  • Aron3 Profile Picture
    5 on 23 Mar 2023 at 16:27:04
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    Where did you make the change?

  • v-liwei-msft Profile Picture
    on 23 Mar 2023 at 02:20:44
    Re: "JSON parsing error, expected 'number' but got 'string'" error in embedded Power Apps in Power BI report

    Hi @PitawatN 

     

    Glad to see you solved the problem.

    You could mark your answer/solution as a 'Solution' to allow more people with the same problem to solve their own problem as quickly as possible.

    Thank you so much! 

     

    Best Regards,

    Levi

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473