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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
wshalex123
Helper III
Helper III

Run a query against a dataset, create .csv

 
Hey,

... i didn't get any help in the Power Automate community, so i'll try it here:

 

Whereever i look, this should work for everyone accept me haha. I Just want to get a .csv table out of my PowerBI table.

 

i got a flow where i a table out of my Power BI report and save it as a .csv in a Sharepoint  folder. 

 

wshalex123_4-1668096996580.png

This is my query text:

DEFINE
VAR _ma1 =
SUMMARIZECOLUMNS(
"Urlaub", SUM(PersonnelManagement_EmployeeDayBalances[Offene Urlaubsstunden]),
"Zeitausgleich", SUM(PersonnelManagement_EmployeeDayBalances[Offener Zeitausgleich])
)
EVALUATE
_ma1

 

 

Results of the flow:

 
wshalex123_5-1668097019630.png

 

Question:

Why doesn't it seperate it in two columns? Instead, it seperates the entries with a comma ","

In DAX editor it's seperating the results in 2 columns, like i'd wish it to be in my .csv file.

 

wshalex123_6-1668097036931.png

What am i doing wrong?

Would be happy if someone can help me out. 🙂 

5 REPLIES 5
ImkeF
Super User
Super User

I support what @jbwtp  suggested.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

ImkeF
Super User
Super User

Hi @wshalex123 ,
csv is a comma separated text format, so the result looks as expected to me.
When openening it in Excel, you can split it by this delimiter: Go to DAta -> Data Tools -> Text to Columns 
and then choose the comma as a separator.
Or open it via Power Query, that's a bit more reliable.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Hey @ImkeF,

 

thanks you for your response. 

 

Iam deleting this file once per day and save it again there via this flow, so a Solution in Power querry would be fitting more in my case.

 

Can you help me with this? 🙂 Or do you have any other idea how i could automattically export the table from Power BI in another table or make in change it in one?

 

Thanks a lot. 

 

Cheers, Alex

Hi @wshalex123,

 

I think what Imke is suggesting is to import the csv file that you create using the Automation via Power Query in Excel.

jbwtp_0-1668115863708.png

 

on the Data tab in the Excel's main menu.

 

P.S. Sorry, in your case this is of course would be another connector - Sharepoint Folder - but the idea remains the same.

 

 

This way you can then import it from PQ to one of the tabs in the Excel workbook as a table and then just refresh when required.

 

Cheers,

John

jbwtp
Memorable Member
Memorable Member

Just giving it another thought: if you still put the data back to Excel, do you want to consider using Analyse in Excel funcionality? This may be a simpler solution, this way you can import data without using Automate and csv as an intermediaries.

 

Regards,

John 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors