Change column names when exporting data from Power BI | Run a query against a dataset

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you are exporting data from power bi to sharepoint onedrive whatever using power automate you are going to notice that the column names contain both the table name and the column name and the reason why they have that is because if you are picking different fields from different tables with the same name you need to know which one is which one so there is reason for the magnus but depending on what we're doing with the export you might not want to have the table name attached to the column name so in this video i'm going to show you how to change the column names before you're actually doing exporting it or sending an email or whatever it is that you want to do so let's get started so on a previous video i showed you how to automatically export data and we support it as a csv to onedrive and this is how the csv look like and you see this is the table name and that's the column name and we want to change that so to do that we're going to reduce the flow that we did on that video i'm going to put the link down below so you can actually follow along if you want with the entire flow but i will not recreate these steps so what we're going to do is what this flow does is every 10 minutes it goes to a power bi data set on the service graphs on data creates a csv table puts it into one drive and what we want to do is create a step between these two to be able to change the demon names before the csv is created so we're going to add a step here and there is a data operation called select that allows you to grab things from arrays and tables and things like that so we're going to use that and we're going to get the first table rows it needs to be an array for some reason so we're going to grab that and then it allows you to map things from whatever table was feed into the step so we have four columns on this dataset that's just so on the csv we have a date order id product id and sales so we're going to map those with the new name so calendar date is going to be called date how do you change the name so you go here to expression and you need to write like this you do item and then parentheses question mark and then you need to let me check the syntax you need to grab now the column name as it is on the data set that the data that is coming in so you put it in between square brackets and then you need to put it the actual name between a single quotation mark so you grab that and then you put calendar and then you put the they that's how the column is called and that's all you need to do and i'm going to do it for all columns so um to be faster you don't have to wait for me okay so now that we have these we need to go to the next step and we need to change the output so the csv create csv output should be the output of the select one not the power bi one click save and let's give the world as the if it works hopefully it does a few moments later okay so now that we have mapped all of the columns the only thing that you need to do is save and test and fingers crossed that it is okay let's see test run done moments later so it's saved let's go to one drive a few seconds ago and voila now we have proper column names to the exports so i hope this was useful on the next video i am going to show you how to save to local folder because that's been highly requested and it's actually quite easy to do so see you tomorrow
Info
Channel: Curbal
Views: 15,338
Rating: undefined out of 5
Keywords: Power bi, powerbi, Curbal, power bi desktop, power bi tutorial, power bi training, power bi for beginners, ruth pozuelo, change column names when exporting data from power bi, change column names run a query against a dataset, run a query against a d, run a query against a dataset power bi, run a query against a dataset power automate
Id: lWu4n-ODe4U
Channel Id: undefined
Length: 4min 3sec (243 seconds)
Published: Tue Jun 21 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.