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 / Export to multiple .cs...
Power Automate
Answered

Export to multiple .csv files on OneDrive from Power BI based on several filters

(0) ShareShare
ReportReport
Posted on by

Hi!
Assume, I have a simple dataset with revenue by an entity by month.

I want a flow to take all the filtered (or unfiltered) combinations of entity and month, create a *.csv file by an entity by month, and dump them into a OneDrive folder.


i.e. if you have 2 entities: A & B

...and 2 months July & August,


I want the flow to create 4 .csv files:

1) EntityA_July.csv,

2) EntiyA_August.csv,
3) EntityB_July.csv,
4) and EntityB_August.csv

Any help is appreciated!

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @xiloid ,

     

    I've made test for your reference:

    1\I assume there is a dataset(I use an array type variable here for testing)

    vbofengmsft_0-1653291875938.jpeg

    2\My flow

    vbofengmsft_1-1653291950342.jpeg

    vbofengmsft_2-1653291956136.jpeg

    Expressions:

     

    item()['Entity']

     

    item()['Month']

     

    union(body('Select'),body('Select'))

     

    union(body('Select_2'),body('Select_2'))

     

    @and(equals(item()['Entity'],items('Apply_to_each')['Entity']),equals(item()['Month'],items('Apply_to_each_2')['Month']))

     

    items('Apply_to_each')['Entity']

     

    items('Apply_to_each_2')['Month']

     

    The Result:

     

    vbofengmsft_3-1653292012098.jpeg
    vbofengmsft_4-1653292035026.jpeg

    Bof

     

     

  • Shaunbuckleyy12 Profile Picture
    79 on at

    Hi @V- ,

    I also have a similar request where I have a dataset with Payroll Data. 

    I need to create upwards of 300 seperate csv. files filtering the data by each cost centre, save them down and also send an email to the relevent cost centre managers with the files attached.

    I think I can use the solution you have above for the creating of the seperate files but your first screenshot of the solution is a little tricky to see, I was wondering if you could add in a clearer one if possible?

     

    Would be much appreciated 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard