thedeadzeds
Active Member
- Joined
- Aug 16, 2011
- Messages
- 451
- Office Version
- 365
- Platform
- Windows
Hi Guys,
Please can you help with the below. When I import the data sometimes some of the columns will be missing from the original dataset. This is ok because I only need certain column but how do I ingore the missing column error?
Thanks
Please can you help with the below. When I import the data sometimes some of the columns will be missing from the original dataset. This is ok because I only need certain column but how do I ingore the missing column error?
Thanks
Power Query:
let
Source = Excel.Workbook(File.Contents("C:\Users\Export.xlsx"), null, true),
Export_Sheet = Source{[Item="Export",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Export_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Order Date", type datetime}, {"Handover Date", type datetime}, {"Invoice Date", type date}, {"Order No", Int64.Type}, {"Keyloop DMS Magic Number", type text}, {"Dealership", type text}, {"Customer Name", type text}, {"Customer Scheme", type any}, {"Sales Exec", type text}, {"Reg No", type text}, {"Make", type text}, {"Range", type text}, {"Model", type text}, {"Derivative", type text}, {"Vin Number", type any}, {"New/Used", type text}, {"Customer Type", type any}, {"Vehicle Without VAT", type number}, {"Vehicle", Int64.Type}, {"Factory Options", type number}, {"Front End", type any}, {"Front End Margin Adjustment ", type any}, {"New Car Reg Bonus", type any}, {"Investor fund ", type any}, {"Bonus Box", type any}, {"Del Profit", type any}, {"Service Plan Income", type any}, {"Contract Hire Base", type any}, {"B/E Margin Adjustment ", type any}, {"Retailer", type any}, {"Incentives", Int64.Type}, {"Over Allowance", Int64.Type}, {"Finance Type", type any}, {"Finance Income", type number}, {"Total Profit", type number}, {"Deal Closed", type any}, {"Manufacturer Order No", type number}, {"Quality - Conquest Lead", type any}, {"Quality - Loyalty Lead ", type any}, {"Loyalty - Service Plans ", type any}, {"Volume - RPM", type any}, {"Total Bonus", type number}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Order Date", "Handover Date", "Invoice Date", "Order No", "Keyloop DMS Magic Number", "Dealership", "Customer Name", "Customer Scheme", "Sales Exec", "Reg No", "Make", "Range", "Model", "Derivative", "Vin Number", "New/Used", "Customer Type"})
in
#"Removed Other Columns"