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
Anonymous
Not applicable

Run Query Automatically and Save Output as CSV

Hi All,

can you guys please point me in the right direction (or straight up help me if you fancy it) Smiley Happy

 

I have my query configured to pick up a file form a shared folder location, process the file and output to an excel table.

 

I called the file "USER_PROCESSOR.xlsx".

Once powerquery did its magic, I then have to save the file as "USERS.CSV" on another folder.

 

I want to avoid manually opening the XLSX file every 6 hour to run the query and save as .CSV, how can this automated?

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Yes, to the first part.  However you can select refresh in the desktop.

 

Explanation for exporting data.

 

Also you might look into dax studio, a free product.

 

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Nathaniel_C
Super User
Super User

Hi @Anonymous ,

Because the data sources are external, you can manually refresh the dataset by using Refresh now or you can set up a refresh schedule by using Schedule Refresh. When you refresh the dataset, Power BI does not connect to the file on the local drive to query for updated data

 

Here you go.

Refresh

 

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

thank you for the always prompt reply!

DO I need POwerBI server for this?

Also, can I program it to save the output as CSV (2nd part of my question?)

Luca

Hi @Anonymous ,

 

Yes, to the first part.  However you can select refresh in the desktop.

 

Explanation for exporting data.

 

Also you might look into dax studio, a free product.

 

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

I ended up using powershell and task scheduler on the server.

The code is minimal and works very well

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.