Forum Discussion
Missing last column
Hi Arkhos94 ,
1. If it is a .csv file, go to the first step of the query and check the code, the number of columns is displayed as a parameter. Remove the parameter and the code will automatically detect the number of columns.
2. Use Table.SelectColumns: Instead of using Table.RemoveColumns, you could use the Table.SelectColumns function. This function allows you to specify which columns to keep, rather than which ones to remove.
If the problem is not resolved, consider releasing the code in the advanced editor, taking care to remove private information such as data sources.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hello,
The source is an .xlsx file
Here are the first lines of my advenced editor code :
let
Source = Excel.Workbook(Web.Contents("https://XXX-my.sharepoint.com/personal/myonedrivemailadress/Documents/PowerBIQualityReport/Myfilename.xlsx"), null, true),
Campagne_Sheet = Source{[Item="Campagne",Kind="Sheet"]}[Data],
#"First line deleted" = Table.Skip(Campagne_Sheet,1),
#"Headers promoted" = Table.PromoteHeaders(#"First line deleted", [PromoteAllScalars=true]),