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

Notifications

Announcements

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

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
    68,717 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard