cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shree13
Helper II
Helper II

Power BI table data export in csv to email using Microsoft Flow

Hello Expert,

How Power BI table data export in csv to email using Microsoft Flow as we know it can refersh data sets but how about tables export as email attachment

 

Shree

 

52 REPLIES 52

 

Hello Expert,

 i think below mentioend are the steps which i needs to excute it

4. Push the Json Document to your Flow Web URL.

5. Convert the Webcall Response

 

Shree

.

Hello Expert,

could you help me with steps for this

4. Push the Json Document to your Flow Web URL.

5. Convert the Webcall Response

 

Shree

Hello  @mwegener 

 

Can you help me with third step please

 

Shree

Hi @Giant ,

 

Could you post a few screenshots of your current steps?

Hi @mwegener 

 

I am trying the generate the url using below mentioned code

Error :Enter valid JSON

let
Source = #"Tracker – SAP",
ToArray = Table.ToRecords(Source),
ToJsonBinary = Json.FromValue(ToArray),

[Content = ToJsonBinary]),
LinesFromBinary = Lines.FromBinary(WebCall)
in
LinesFromBinaryerror.png

 

Hi @Giant ,

 

start with this and post a screenshot

 

Just create a Flow whose trigger is a “When a HTTP request is received” (no further inputs in that step) and add a “Compose”-action with the Body-element in it. Then save the Flow and copy the generated URL:

1_Setup_Webservice

Hi @mwegener ,

 

thanks for the response,

 

Parse the result and load this query to the datamodel (this is very important, because otherwise the WebCall wouldn’t be made if the dataset is refreshed!):

  • row 8: Lines.FromBinary(<WebCallFromAbove>)

I think it is power bi desktop datamodel edit query option ..is it correct?

 

Shree

Hi @Giant ,

 

did you receive a URL?
Yes, the next steps are at Power BI Desktop.
Can you do that steps and post a screenshot?

Hi @mwegener ,

 

here is the screenshots but i am getting after the step,

Error Message

Formula.Firewall: Query '10 millions (2)' (step 'LinesFromBinary') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.10millions.png

 

 

Error

Error1.png

 

Hi @mwegener 

 

I corrected this step,No reference table required, can do it with original table

 

no reference table req.png

 

Shree

 

Hi @Giant ,

 

has data arrived in flow?

 

Gives error in 3rd step

create csv.png

 

Entered correct value

 

Create csv1.png

 

 

Could you post a screenshot from your 2nd step?

 

 

Able to download the file...1st step is successfully completed till download data to onedrive but only question is in mind for data refresh ..how it will pull the data from workspace or desktop..

Test.png

 

i did datasets refresh automation as below and it is essential to refresh the data 

https://powerbi.microsoft.com/en-us/blog/refresh-your-power-bi-dataset-using-microsoft-flow/

 

Shree

 

I think you can use the normal Power BI Service Data refresh schedule.

 

https://docs.microsoft.com/en-us/power-bi/refresh-data#setting-a-refresh-schedule

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

 

Hi @mwegener 

 

if i publish the same pbis file to the workspace or say myworkspace and schedule data refresh from there as mentioned in your link and then if i trigger flows further export data will it take it from workspace or power bi desktopworkspace.png

 

Shree

 

 

 

Workspace (Power BI Service)
Power BI Desktop is only for the development and you have no connection from the internet (flow) to your Power BI Desktop.

 

Hi @mwegener ,

 

CSV. file is created in JSON format how it will convert it 

 

[{"Column1":"1"}{"Column1":"2"}{"Column1":"3"}{"Column1":"4"}

 

convert in columns and rows like mentioned below in csv file

column1

1

2

3

 

Shree

 

Could you post a screenshot from your 2nd Flow step?

 

Modify the “Compose”-step to parse out the table from the JSON like this:

1_FlowCompose

 

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (61,538)