Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TomA1
Frequent Visitor

Create Sharepoint folders based upon power bi table

Hi everyone, 

 

I aw willing to create folders within a Sharepoint Library based on wether a table from my power bi report has a new row added upon daily refresh. 

 

Here is the business case : 

 

I do have a table in my dataset that lists the active suppliers accounts. 

 

I am willing for each dataset refresh to detect wether there is a new supplier account created since previous check. If no, then nothing. Else create a folder in the sharepoint library and the folder's name is provided within one of the table's columns. 

 

I'm anticipating I'll probably have to use Power Automate, but so far, .... I coldn't achieve anything. 

 

Any thoughts ? Help will be much appreciated. 

 

Have a nice day & thanks for your time.  

4 REPLIES 4
TomA1
Frequent Visitor

Hi @christinepayton , firstly, thanks for your time & reply. 

 

I'm a no-code person hence starting to be lost when I hear about JSON and so on :), I also saw it was possible to create a folder in a library based on a sharepoint list update from an excel file (the excel file has the same data as my bi report table, I just got the data in an excel sheet with a connection instead of a pbix). 

 

The scenario would be as such : 

 

1) Excel file listing all of the supplier accounts stored in a sharepoint & refreshable (let's say once a week)

2) If new rows, create relevant list entry (I concatenate the supplier code & name to get a unique ID) That is where I guess I'll have to check & compare to existing values wether the unique ID has been found or not, if yes then nothing (already existing entry) if not then create list entry leading to a folder creation in the library. 

 

I'm not looking for the shortest way to achieve this, but rather for the simpliest way for maintenance purposes with the less possible code. Even if that means adding a few steps to the process. 

 

Once again, may thanks for the help & time & I wish you a nice day. 

Yeah, if your Excel file is in SharePoint then you don't need to query the dataset and do the parse JSON. It was only suggested because you were asking for data in a Power BI table to make the folder in the question title-- 

 

You might try asking this in the Power Automate forum if the solution you're looking for doesn't involve Power BI - you'll get a better response there. 🙂

@christinepayton thanks for the tip, i just posted my case over there. The Power BI option seems to be the most robust & automated option as the dataset refreshes daily, but the excel option seems more in reach for no-code people :). Thanks for the time you took to reply. 

christinepayton
Super User
Super User

I think you could probably do this with the "query a Power BI dataset" action in a scheduled Power Automate flow. What I would do is create a hidden tab in your report that shows the rows you consider "new" - so a relative created date filter or similar, then get the query from that from the query optimizer (it has an option to "copy DAX") and use that in your Power Automate flow. 

 

Then, use the Parse JSON action on the response from the querystep and use a for-each loop on the table rows. Inside the loop, you can use the action to create a SharePoint folder with any of the parsed data from the table (e.g Account Name and/or ID). 

 

Make sure the refresh schedule on the semantic model and the Power Automate flow schedule are relatively close together - if you want to you could put an action to refresh the model as the first step in the flow, too. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.