cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thayward
New Member

PowerBI - run a query against a dataset to add new rows in an excel sheet

Hi there,

 

Currently, I pull data from a CRM system using an API. Because of this, we can't look at the 'state' of the system historically as it updates automatically.

My thinking is to create a DAX formula that summarises the data I need, then run this through a 'Run a query against a dataset' and then add the result from the DAX formula into a new row in an Excel spreadsheet.

 

I've got a DAX formula which uses 'SUMMARIZECOLUMNS' to gain the result I want, but I am having trouble putting this into an Excel spreadsheet as new rows.

 

Could anyone help me on this?

 

Thanks,

Tom

1 ACCEPTED SOLUTION

Accepted Solutions
thayward
New Member

@renearide I did find a solution but it's not the most ideal one.

thayward_0-1669021232784.png

This is the flow I am using. Essentially it runs the query, creates a CSV table of results, then that table of results is put into a new row in Excel. The problem with this is that it puts ALL the results into one cell, so you have to do transformations on the data afterwards to extract the data. The Excel my flow creates is pulled back into PowerBI anyway so I can use some Power Query functions to transform each cell into the actual table I desire.

I hope this helps.

View solution in original post

2 REPLIES 2
renearide
New Member

@thayward Did you find any solution? I also need to run a query and add rows in Excel.

thayward
New Member

@renearide I did find a solution but it's not the most ideal one.

thayward_0-1669021232784.png

This is the flow I am using. Essentially it runs the query, creates a CSV table of results, then that table of results is put into a new row in Excel. The problem with this is that it puts ALL the results into one cell, so you have to do transformations on the data afterwards to extract the data. The Excel my flow creates is pulled back into PowerBI anyway so I can use some Power Query functions to transform each cell into the actual table I desire.

I hope this helps.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,560)