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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
LavenderRose24
New Member

Transform file with different versions/headers into one set output.

I am very new to Power BI, and am stuck. Any guidance is beyond appreciated! 

I have a file that is downloaded on a daily basis. When we first started exporting the file, we based our reporting on its original format. This is the first version of the file. Over time, the columns on that export have changed. Some columns have been re-ordered, there are new columns, and some columns go away. In total there are 4 different "versions" of the file. The columns that the files do have in common have the exact same name/syntax, just in different spots. 

Im trying to create a Power BI that will map the columns into a set output so that all of the files are in the exact same format and order. The output would include all header possibilities in a set order. If a version of the file being ran doesn't have a column, the column needs to remain and just be blank. I do not need to combine the files, i would be running one file at a time to then export in the new, correct format. 

please let me know if any more information is needed, thank you again!

1 REPLY 1
v-yohua-msft
Community Support
Community Support

Hi, @LavenderRose24 

Maybe you can use PowerQuery to achieve your requirement.

Load your data into Power BI by clicking on Home > Get Data > More > File > CSV. Once your data is loaded, click on Home > Edit Queries to open the Power Query Editor.
To reorder the columns, select the column you want to move, then click on Transform > Move > To Beginning or To End, or use Drag and Drop. If a version of the file doesn’t have a column, you can add a new column by clicking on Add Column > Custom Column. You can leave the custom column formula blank or set it to a default value.
If there are columns that are not needed, you can remove them by right-clicking on the column header and selecting Remove.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.