Hello,
I have a flow working nearly perfectly. Once a day, a query is run against a PowerBI Dataset and then creates a csv, which is then emailed to a user for further automation.
But I would like to be able to control the csv column names, and I can't figure out how to do so. I've tried everything I can think of and I've gone through CoPilot; nothing seems to work.
Below are photos of my flow and the resulting CSV.
For column 1, the result is currently Query1[Contact ID (Contact) (Contact)]. I would like it to simply be called Contact ID.
Photo 1: The CSV step.
Photo 2: The result csv headers
Photo 3: The flow itself
You can choose "Custom" from 'Columns' parameter and set the column name in the header key textbox as per the need. Here is an example for State column:
Below expression needs to be added in the Function window as highlighted in the above screenshot.
item()?['Query[State]']
it takes column name as the index for item() function. So, apply item() function for each custom column as per the need.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional