Hello,
I need help solving an issue with one of my flows. There are two Power Automate flows that are used to retrieve csv files that I then transform and use to feed a Power BI dashboard that we use for reports and statistics.
Power Automate Flow #1 → This one downloads a tab separated file from a website twice a day and stores it into a Sharepoint folder.
Power Automate flow #2 → This one takes each file that was downloaded and trims it removing certain columns that cannot be kept. and creating a new csv table that will be used to feed the Power BI report.
The problem is that after July 16th, the file is not being stored in the proper format, which is causing my Power BI to load empty columns instead of loading the data correctly.
This is the correct format of the file:
This is the format being saved by Power Automate:
This is the flow I use to transform the file:
1. The CSVDecode step has the following formula:
split(decodeUriComponent(replace(uriComponent(body('Get_file_content')),'%0A','#NEWLINE#')),'#NEWLINE#')
2. The Select step chooses the columns by using the tab as a delimiter:
3. The create CSV table takes the body of the Select action.
4. The ChangeDelimiter action changes the delimiter generated automatically by the CSV:
replace(body('Create_CSV_table'),',',' ')
5. The file is generated by using the body from the csv table:
I cannot use the original files to transform them directly into Power BI because these files are deleted every 6 months, which would affect my report.
Can anybody help me determine how I can fix the flow to generate the correct file format?
Thanks in advance.