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 Automate / Convert power BI table...
Power Automate
Answered

Convert power BI table to JSON to array

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm building this flow where I parse JSON from a query against Power BI to later create some conditional logic based on the values inside the array. 

 

Unluckily I get this error: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@@body('Parse_JSON')?['@{variables('New Array')}']'
' is of type 'String'. The result must be a valid array.

 

And this is my squema: 

{
  "type""object",
  "properties": {
    "body": {
      "type""object",
      "properties": {
        "results": {
          "type""array",
          "items": {
            "type""object",
            "properties": {
              "tables": {
                "type""array",
                "items": {
                  "type""object",
                  "properties": {
                    "rows": {
                      "type""array",
                      "items": {
                        "type""object",
                        "properties": {
                          "ShortView Mix[Source]": {
                            "type""string"
                          },
                          "ShortView Mix[Status]": {
                            "type""string"
                          },
                          "[IsGrandTotalRowTotal]": {
                            "type""boolean"
                          },
                          "[SumCount]": {
                            "type""integer"
                          }
                        },
                        "required": [
                          "[IsGrandTotalRowTotal]",
                          "[SumCount]"
                        ]
                      }
                    }
                  },
                  "required": [
                    "rows"
                  ]
                }
              }
            },
            "required": [
              "tables"
            ]
          }
        },
        "firstTableRows": {
          "type""array",
          "items": {
            "type""object",
            "properties": {
              "ShortView Mix[Source]": {
                "type""string"
              },
              "ShortView Mix[Status]": {
                "type""string"
              },
              "[IsGrandTotalRowTotal]": {
                "type""boolean"
              },
              "[SumCount]": {
                "type""integer"
              }
            },
            "required": [
              "[IsGrandTotalRowTotal]",
              "[SumCount]"
            ]
          }
        }
      }
    }
  }
}

 

nibgli_0-1683206363202.png

nibgli_1-1683206603107.png

 

 

Categories:
I have the same question (2)
  • Verified answer
    Pstork1 Profile Picture
    69,129 Most Valuable Professional on at

    I suspect you are parsing the JSON from the object returned by Power BI and not the "results" property.  Results is the array.  If your current schema is working for you then just make sure you use the Results dynamic content in your loop.  Or when you get the content back from Power BI make sure you use the Results property and not the whole body.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard