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

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

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

here are a few screenshots from my test.

My source table:

FlowTable.png

My Power Query Code to send the data to Flow.

FlowMCode.png

My transformed data in Flow.

CreateCSVTable.png


Hope this helps.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

65 REPLIES 65
Anonymous
Not applicable

 

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.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

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

 

 

 

Anonymous
Not applicable

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

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

Hi @mwegener 

 

Here is screenshot

 

2nd stage.png

 

Hi @Anonymous ,

 

please check which Output you use.

CheckOutput.png

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.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

Hi @mwegener 

 

output is still JSON format..Do we have to convert it in power BI Desktop as output itself is coming in JSON format in web call method. can we use direct web call method with JSON format

output.png

Shree

 

Anonymous
Not applicable

Hi @mwegener 

 

The issue is after adding to the web call method ...it is showing as list and afer converting not showing any dataList.png

in every column in output it is showing like this

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

{"Column1":"3"}{"Column1":"4"}{"Column1":"5"}{"Column1":"6"}{"Column1":"7"}

 

Anonymous
Not applicable

Hi @mwegener 

 

when converting the same list into table getting blank data Convert.png

 

Hi @Anonymous ,

 

here are a few screenshots from my test.

My source table:

FlowTable.png

My Power Query Code to send the data to Flow.

FlowMCode.png

My transformed data in Flow.

CreateCSVTable.png


Hope this helps.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi,

 

I have managed to recreate the steps mentioned in the following article to export data from Power BI.

https://www.thebiccountant.com/2019/04/01/export-data-from-power-bi-using-microsoft-flow/ 

 

I have created report using excel file on local computer.There are no errors on flow and power bi side. However, flow doesnt trigger when a dataset is refreshed.

 

Could someone please help me check what's going wrong with triggering the flow?

 

Thanks.

SV

Anonymous
Not applicable

take large scale of data

Anonymous
Not applicable

Hi @mwegener 

I am also creating reference table but getting error

Error3.png

 

Reference table query

 

 

Query in reference table

reference.png

 

Anonymous
Not applicable

[Edit]

I'm receiving the same error.

 

Query

 

let
Source = #"BE Confirmations Driver",
ToArray = Table.ToRecords (Source),
ToJsonBinary = Json.FromValue(ToArray),
WebCall = Web.Contents("https://prod-99.westeurope.logic.azure.com:443/workflows/.../triggers/manual/paths/invoke?api-versio......",
[Content=ToJsonBinary]),
Lines.FromBinary = Lines.FromBinary(WebCall)
in
Lines.FromBinary

 

Data Source setting anonymous

Error.png

 

 

Any help would be much appreciated ! 

 

Oh.. OK 😞 .   I am trying to convert  Microsoft Teams call quality Dashboard Data to CSV format then email or store it to onedrive for  internal audit purpose. My plan was to publish Microsoft Teams Call Quality Dashboard to Power BI service , Use Power Query editor to convert it to JSON , then Use flow to convery to CSV then Email. 

Is there any connector in  Power Query I can use to get data from  POwerBI service or Microsoft Teams Dashboard directly ? 

 Any other thought?? 

 Thanks again for  the input. 

Hi @shanmanz,.

 

Unfortunately, you cannot currently access an existing dataset in Power BI Service with Power Query.

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi , 

I tried above solution but stuck at Powerquery editor step converting to JSON.

  •  I created 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 .
 

PBI2.PNG

  • What source do I need to enter in  the below code in Powerquery editor to connect to dataset at apps.powerbi.com  that will convert records to JSON format. 

let
Source = #”1_SourceTable”,
ToArray = Table.ToRecords(Source),
ToJsonBinary = Json.FromValue(ToArray),
WebCall = Web.Contents(
“URL from FLow ”,
[Content = ToJsonBinary]),
LinesFromBinary = Lines.FromBinary(WebCall)

in
Lines.FromBinary

 

Thanks

 

Anonymous
Not applicable

Hi @mwegener 

 

thank you so much!!!!!!!!😎 ...it working like anything

 

Anonymous
Not applicable

Go to file option and select ignore privacy session and run it . i just tested it working fine

 

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.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.