Skip to main content

Notifications

Community site session details

Community site session details

Session Id : c6axBvyK43xtTgfq6pxFNk
Power Automate - Building Flows
Answered

How to: Run Query against a data set -> Populate SharePoint List

Like (0) ShareShare
ReportReport
Posted on 10 Nov 2022 04:17:09 by

Hey there, newbie here~

I'm looking to take a PowerBI dataset and push the data into a SharePoint list on a daily basis. 

image.png

 

After running the query against the dataset, I'm a bit lost...
I was hoping anyone would be able to give me a hand with the steps I'd need to take in populating the SharePoint list below with the Query above..!

Jojojojojo_2-1668053571345.png

Thanks,

Jojojojojojojo

 

 

  • power_ap Profile Picture
    46 on 26 Jul 2023 at 04:05:34
    Re: How to: Run Query against a data set -> Populate SharePoint List

    New to Power Automate, came across this post b/c I was looking to do the same.

     

    My solution is a bit different: basically I used output of PBI query to initialize a variable (which outcome is supposed to be an array), then I parsed JSON (I used PBI query result data and the "Generate from sample" function to create the JSON schema), after which I created SharePoint list. Tested and seemed work fine!

     

    Capture.JPG

  • Debbie E Profile Picture
    62 on 15 May 2023 at 09:43:37
    Re: How to: Run Query against a data set -> Populate SharePoint List

    I have used the same process. for some reason the csv ends up with a blank row at the end even though there are no blank rows coming through on the DAX Query so this is making the Parse JSON error.

     

    I wonder if there is a way of getting rid of this empty field in the csv?

  • Community Power Platform Member Profile Picture
    on 07 May 2023 at 16:07:04
    Re: How to: Run Query against a data set -> Populate SharePoint List

    @jdwood44 

    Here's what I ended up using. Note that when I generated this from a sample, it set all fields as required, I had to go back and edit that part since my data contains nulls.

    plaidpenguinhat_0-1683475708350.png

     

     

    {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "RepsAll[LOB]": {
     "type": "string"
     },
     "RepsAll[SEQ]": {
     "type": "string"
     },
     "RepsAll[AgentID]": {
     "type": "integer"
     },
     "RepsAll[Name]": {
     "type": "string"
     },
     "RepsAll[Location]": {
     "type": "string"
     },
     "RepsAll[Coach]": {
     "type": "string"
     },
     "RepsAll[Manager]": {
     "type": "string"
     },
     "RepsAll[NTID]": {
     "type": "string"
     },
     "RepsAll[WPCode]": {
     "type": "string"
     },
     "RepsAll[P#]": {
     "type": "integer"
     },
     "RepsAll[TimeStamp]": {
     "type": "string"
     }
     },
     "required": [
     "RepsAll[Name]",
     "RepsAll[TimeStamp]"
     ]
     }
    }

     

  • jdwood44 Profile Picture
    3 on 17 Apr 2023 at 17:27:09
    Re: How to: Run Query against a data set -> Populate SharePoint List

    Hi, Jojojojojo. Would you mind sharing screen shots of your Parse JSON above (of course, feel free to redact any sensitive data)?

  • Jojojojojo Profile Picture
    on 08 Jan 2023 at 23:03:46
    Re: How to: Run Query against a data set -> Populate SharePoint List

    Hey thanks for the reply!

    Yeah that looks great! Thanks for the solution, works for me 🙂

    Jojojojojo_0-1673218972946.png

     

  • Verified answer
    Reina_CP Profile Picture
    21 on 27 Dec 2022 at 19:29:22
    Re: How to: Run Query against a data set -> Populate SharePoint List

    Its me again! 

     

    I manage to solve it following this video:

    https://www.youtube.com/watch?v=sXdeg_6Lr3o

     

    Basically you create a csv file after you run the query, and then just need to parse it. After that you can add all the items from your table to the share point list

     

    My flow looks like this

    Reina_CP_0-1672169118413.png

     

    I going to be testing this but so far on my manuals runs it is working!

     

  • Reina_CP Profile Picture
    21 on 27 Dec 2022 at 16:29:34
    Re: How to: Run Query against a data set -> Populate SharePoint List

    Hi there! were you able to figure this out? this is actually what I trying to do 😁

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started
Loading complete