Home

Problem : Power QUery will notload to Data Model

%3CLINGO-SUB%20id%3D%22lingo-sub-355279%22%20slang%3D%22en-US%22%3EProblem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355279%22%20slang%3D%22en-US%22%3E%3CP%3EBackground%3A%20A%20PowerQuery%20had%20been%20successfully%20combining%20data%20from%20a%20dozen%20large%20(101%20cols%20x%20100%2C000%20row%20csv%20files.%20The%20table%20was%20extensively%20cut%20with%20~80%25%20rows%20filtered%20out%20%2C%20unwanted%20cvolumns%20removed%2C%20and%20some%20new%20data%20columns%20added.%20Output%20was%20a%20table%20loaded%20to%20workbook%20only.%20This%20ran%20successfully%20over%20several%20months%20with%20a%20new%20CSV%20data%20file%20being%20added%20to%20the%20list%20every%20week.%20The%20PQ%20got%20somewhat%20slower%2C%20as%20the%20data%20got%20more%20extensive%2C%20but%20still%20ran%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProblem%20%3A%20on%20trying%20to%20develop%20this%2C%20I%20wished%20to%20be%20able%20to%20load%20the%20table%20to%20the%20Workbook%20Data%20Model%2C%20in%20order%20to%20add%20some%20measures%2C%20based%20on%20ISO%20Week%20calendar%20(e.g.%20show%20variationof%20latest%20week%20against%20average%20of%20preceding%20weeks).%20Result%20%3A%20if%20the%20Query%20settings%20are%20changed%20to%20'Load%20to%20Data%20Model'%20(irrespective%20of%20load%20to%20Table%2C%20or%20Connection-only)%20then%20the%20query%20goes%20into%20a%20spinning-wheel-of-doom.%20The%20query%20shows%20'Retrieving%20Data...'%20but%20the%20row-count%20never%20updates%20nor%20does%20it%20show%20any%20source%20files%20being%20loaded.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20way%20to%20stop%20it%20is%20to%20hit%20ESC%2C%20in%20fact%20sometimes%20that%20doesn't%20work%20either%20and%20I%20have%20to%20start%20Task%20Manager%20and%20aim%20to%20kill%20the%20Excel%20process%3B%20it%20isn't%20needed%20to%20actually%20kill%20it%2C%20just%20to%20issue%20the%20Stop%20Process%20command%20seems%20to%20eventually%20interrupt%20the%20loop.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEffect%20%3A%20this%20means%20I%20am%20restricted%20to%20loading%20the%20combined%20data%20into%20a%20Table%20and%20cannot%20add%20context-specific%20measures.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMore%20generally%20%3A%20I%20am%20finding%20Get%20%26amp%3B%20Transform%20powerful%20for%20simple%20use-cases%2C%20but%20in%20this%20example%2C%20no%20alone%20have%20I%20found%20this%20'does%20not%20load%20to%20Data%20Model'%20issue%20but%20I'm%20also%20suffering%20from%20a%20lack%20of%20knowleddge%20and%20resources%20on%20how%20to%20optimise%20the%20data-load.%20I%20am%20sure%20there%20is%20some%20ability%20to%20cache%20the%20data%20from%20the%20older%20CSVs%20(only%201%20new%20one%20added%20each%20week)%2C%20but%20it%20is%20impossible%20to%20fnd%20any%20decent%20resources.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-355279%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENeed%20Help%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-363165%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-363165%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%20you%20may%20well%20be%20sorry%20you%20asked%2C%20but%20here%20goes.%3C%2FP%3E%3CP%3EBTW%2C%20my%20present%20solution%20on%20my%20full%20data%20set%20(10%20-%2015%20CSV%20files%20with%20~100%2C000%20rows%20x%20100%20columns)%20is%20now%20working%20really%20well.%20Dividing%20the%20munge%20functions%20between%20G%26amp%3BT%20and%20the%20DM%20is%20giving%20me%20what%20I%20need*%2C%20and%20it%20is%20working%20faster%20and%20more%20smoothly%20than%20before.%20So%20I%20don't%20have%20an%20immediate%20issue%2C%20just%20a%20nagging%20sense%20of%20something%20not%20being%20quite%20right.%3C%2FP%3E%3CP%3E(*%20apart%20from%20not%20being%20able%20to%20filter%20by%20table%20as%20I%20explained%20previously%2C%20but%20I%20can%20live%20with%20that).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20-%20this%20is%20a%20'toy'%20example%20using%20smaller%20data-sets%20that%20I%20had%20built%20just%20to%20try%20out%20filtering%20techniques%20in%20PQ.%20But%20essentially%20identical%20to%20what%20I%20was%20doing%20on%20the%20full%20data-set.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%202%20key%20Queries%20A%20%3A%20Load%20from%20folder%20of%20CSV%20files%2C%20do%20some%20basic%20filtering%20and%20manipulation%2C%20resulting%20in%20a%20table.%20Query%20B%20takes%20that%20table%20and%20does%20some%20more%20complicated%20operation%2C%20the%20key%20is%20using%20a%20table%20(loaded%20from%20cells%20in%20the%20workbook)%20to%20test%20a%20column%20in%20the%20table%20for%20presence%20of%20text%20strings.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIN%20checking%20this%20for%20reproducibility%2C%20I%20found%20that%20with%20a%20very%20small%20data%20set%20(2%20files%20each%20of%2010%20rows)%2C%20everything%20worked%20fine%20and%20I%20could%20load%20to%20the%20DM%20no%20problem.%20When%20I%20increased%20the%20size%2010%20files%2C%20each%2010%2C000%20rows%20then%20%3A%3C%2FP%3E%3CP%3EQuery%20A%20worked%20and%20either%20loaded%20to%20DM%20or%20made%20connection%2C%20no%20problem.%3C%2FP%3E%3CP%3EQuery%20B%20worked%20on%20load%20to%20Table%20(or%20connection%20only)%2C%20but%20ticking%20the%20'Load%20to%20DM'%20meant%20the%20query%20never%20refreshed.%20I%20say%20'never'%20--%20I%20leave%20it%20for%20up%20to%2015%2F20%20minutes%20and%20find%20it%20is%20still%20saying%20'retrieving%20data'%20and%20never%20gets%20on%20to%20incrementing%20rows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuery%20A%20%3A%3C%2FP%3E%3CP%3Elet%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Source%20%3D%20Folder.Files(%22H%3A%5CMy%20Documents%5CSupplyAndDemand%5CONDB%5CToyData%5CCSVExtractFruit%22)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Filtered%20Hidden%20Files1%22%20%3D%20Table.SelectRows(Source%2C%20each%20%5BAttributes%5D%3F%5BHidden%5D%3F%20%26lt%3B%26gt%3B%20true)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Invoke%20Custom%20Function1%22%20%3D%20Table.AddColumn(%23%22Filtered%20Hidden%20Files1%22%2C%20%22Transform%20File%20from%20CSVExtractFruit%22%2C%20each%20%23%22Transform%20File%20from%20CSVExtractFruit%22(%5BContent%5D))%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Renamed%20Columns1%22%20%3D%20Table.RenameColumns(%23%22Invoke%20Custom%20Function1%22%2C%20%7B%22Name%22%2C%20%22Source.Name%22%7D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Removed%20Other%20Columns1%22%20%3D%20Table.SelectColumns(%23%22Renamed%20Columns1%22%2C%20%7B%22Source.Name%22%2C%20%22Transform%20File%20from%20CSVExtractFruit%22%7D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Expanded%20Table%20Column1%22%20%3D%20Table.ExpandTableColumn(%23%22Removed%20Other%20Columns1%22%2C%20%22Transform%20File%20from%20CSVExtractFruit%22%2C%20Table.ColumnNames(%23%22Transform%20File%20from%20CSVExtractFruit%22(%23%22Sample%20File%22)))%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Changed%20Type%22%20%3D%20Table.TransformColumnTypes(%23%22Expanded%20Table%20Column1%22%2C%7B%7B%22Source.Name%22%2C%20type%20text%7D%2C%20%7B%22Column1%22%2C%20type%20text%7D%2C%20%7B%22Column2%22%2C%20type%20text%7D%2C%20%7B%22Column3%22%2C%20type%20text%7D%2C%20%7B%22Column4%22%2C%20type%20text%7D%2C%20%7B%22Column5%22%2C%20type%20text%7D%2C%20%7B%22Column6%22%2C%20type%20text%7D%2C%20%7B%22Column7%22%2C%20type%20text%7D%2C%20%7B%22Column8%22%2C%20type%20text%7D%2C%20%7B%22Column9%22%2C%20type%20text%7D%2C%20%7B%22Column10%22%2C%20type%20text%7D%7D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Promoted%20Headers%22%20%3D%20Table.PromoteHeaders(%23%22Changed%20Type%22%2C%20%5BPromoteAllScalars%3Dtrue%5D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Changed%20Type1%22%20%3D%20Table.TransformColumnTypes(%23%22Promoted%20Headers%22%2C%7B%7B%22Fruit2018Week49.csv%22%2C%20type%20text%7D%2C%20%7B%22Week%22%2C%20type%20text%7D%2C%20%7B%22Market%22%2C%20type%20text%7D%2C%20%7B%22City%22%2C%20type%20text%7D%2C%20%7B%22XS_Col1%22%2C%20type%20text%7D%2C%20%7B%22XS_Col2%22%2C%20type%20text%7D%2C%20%7B%22What_Ships%22%2C%20type%20text%7D%2C%20%7B%22Fruit_Desc%22%2C%20type%20text%7D%2C%20%7B%22Shipment_size%22%2C%20type%20number%7D%2C%20%7B%22Shipment_Value%22%2C%20Int64.Type%7D%2C%20%7B%22XS_Col3%22%2C%20type%20text%7D%7D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Removed%20Columns%22%20%3D%20Table.RemoveColumns(%23%22Changed%20Type1%22%2C%7B%22XS_Col1%22%2C%20%22XS_Col2%22%2C%20%22XS_Col3%22%7D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Merged%20Queries%22%20%3D%20Table.NestedJoin(%23%22Removed%20Columns%22%2C%7B%22Market%22%7D%2CCountry_to_include%2C%7B%22CC_to_include%22%7D%2C%22Country_to_include%22%2CJoinKind.Inner)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Removed%20Columns1%22%20%3D%20Table.RemoveColumns(%23%22Merged%20Queries%22%2C%7B%22Country_to_include%22%7D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Merged%20Queries1%22%20%3D%20Table.NestedJoin(%23%22Removed%20Columns1%22%2C%7B%22Week%22%7D%2CWeeks_to_include%2C%7B%22Week%22%7D%2C%22Weeks_to_include%22%2CJoinKind.Inner)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Removed%20Columns2%22%20%3D%20Table.RemoveColumns(%23%22Merged%20Queries1%22%2C%7B%22Weeks_to_include%22%7D)%3CBR%20%2F%3Ein%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Removed%20Columns2%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuery%20B%20%3A%20(%3CSTRONG%3Edoesn't%20load%20to%20DM%3C%2FSTRONG%3E)%3C%2FP%3E%3CP%3Elet%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Source%20%3D%20CSVExtractFruit%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Added%20Custom%22%20%3D%20Table.AddColumn(%23%22Source%22%2C%22US%20Fruit%22%2C%20each%20if%20%5BMarket%5D%20%3D%20%22US%22%20then%20List.Intersect(%7BText.Split(%5BFruit_Desc%5D%2C%22%20%22)%2C%7BUS_Fruit%5BUS_Fruit%5D%7D%7B0%7D%7D)%7B0%7D%3F%20else%20null)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Added%20Custom1%22%20%3D%20Table.AddColumn(%23%22Added%20Custom%22%2C%20%22FruitKeyWord%22%2C%20each%20if%20Text.Contains(%5BFruit_Desc%5D%2C%20%22FRUIT%3A%22)%20then%20Text.BetweenDelimiters(%5BFruit_Desc%5D%2C%22FRUIT%3A%22%2C%22%20%22)%20else%20null)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Merged%20Columns%22%20%3D%20Table.CombineColumns(%23%22Added%20Custom1%22%2C%7B%22FruitKeyWord%22%2C%20%22US%20Fruit%22%7D%2CCombiner.CombineTextByDelimiter(%22%22%2C%20QuoteStyle.None)%2C%22AllFruitFound%22)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Filtered%20Rows%22%20%3D%20Table.SelectRows(%23%22Merged%20Columns%22%2C%20each%20(%5BAllFruitFound%5D%20%26lt%3B%26gt%3B%20%22%22))%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Merged%20Queries%22%20%3D%20Table.NestedJoin(%23%22Filtered%20Rows%22%2C%7B%22AllFruitFound%22%7D%2CTop_Fruit%2C%7B%22Top_Fruit%22%7D%2C%22Top_Fruit%22%2CJoinKind.LeftOuter)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Expanded%20Top_Fruit%22%20%3D%20Table.ExpandTableColumn(%23%22Merged%20Queries%22%2C%20%22Top_Fruit%22%2C%20%7B%22Top_Fruit%22%7D%2C%20%7B%22Top_Fruit.Top_Fruit%22%7D)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Renamed%20Columns%22%20%3D%20Table.RenameColumns(%23%22Expanded%20Top_Fruit%22%2C%7B%7B%22Top_Fruit.Top_Fruit%22%2C%20%22TopFruitFound%22%7D%7D)%3CBR%20%2F%3Ein%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%22Renamed%20Columns%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%20data-file%20--%20first%20few%20rows%20of%2010%2C000%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3EWeek%3C%2FTD%3E%3CTD%3EMarket%3C%2FTD%3E%3CTD%3ECity%3C%2FTD%3E%3CTD%3EXS_Col1%3C%2FTD%3E%3CTD%3EXS_Col2%3C%2FTD%3E%3CTD%3EWhat_Ships%3C%2FTD%3E%3CTD%3EFruit_Desc%3C%2FTD%3E%3CTD%3EShipment_size%3C%2FTD%3E%3CTD%3EShipment_Value%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E2019-Week07%3C%2FTD%3E%3CTD%3ECA%3C%2FTD%3E%3CTD%3EToronto%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EAll_Fruit%3C%2FTD%3E%3CTD%3EAn%20assortment%20of%20FRUIT%3AHoneydew%20Couried%20to%20dest%3C%2FTD%3E%3CTD%3E10%3C%2FTD%3E%3CTD%3E1%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E2019-Week07%3C%2FTD%3E%3CTD%3ECA%3C%2FTD%3E%3CTD%3EOttawa%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EVegetable%3C%2FTD%3E%3CTD%3EShipment%20of%20VEG%3Akonjac%20sent%20by%20overland%20shipping%3C%2FTD%3E%3CTD%3E10%3C%2FTD%3E%3CTD%3E1%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E2019-Week07%3C%2FTD%3E%3CTD%3EUS%3C%2FTD%3E%3CTD%3EChicago%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EAll_Fruit%3C%2FTD%3E%3CTD%3EShipment%20of%20FRUIT%3ARedcurrant%20sent%20by%20overland%20shipping%3C%2FTD%3E%3CTD%3E10%3C%2FTD%3E%3CTD%3E3%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E2019-Week07%3C%2FTD%3E%3CTD%3ECA%3C%2FTD%3E%3CTD%3EOttawa%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EVegetable%3C%2FTD%3E%3CTD%3EShipment%20of%20VEG%3Abutternut%20squash%20Couried%20to%20dest%3C%2FTD%3E%3CTD%3E100%3C%2FTD%3E%3CTD%3E84%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-360142%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360142%22%20slang%3D%22en-US%22%3EHi%3CBR%20%2F%3E%3CBR%20%2F%3EHow%20many%20queries%20are%20involved%3F%20If%20it's%20just%20one%20then%20could%20you%20just%20copy%20and%20past%20the%20M%20code%20from%20the%20advanced%20editor.%20Shouldn't%20be%20any%20security%20issues%20with%20that.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-360130%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360130%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%20sorry%20for%20the%20delayed%20response.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20having%20some%20issues%20trying%20to%20check%20reproducibility.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20original%20file%20is%20way%20too%20big%20and%20in%20any%20case%20contains%20non-public%20information%20which%20is%20not%20appropriate%20to%20share.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20made%20a%20tiny%20version%20with%20a%20self-contained%20table%20created%20in%20PQ%20code%2C%20but%20that%20actually%20filters%20fine%20against%20a%20table%20from%20a%20Worksheet%20cell%20range%2C%20and%20loads%20to%20the%20DM%20just%20fine.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20have%20a%20toy%20version%20of%20the%20data%2C%20this%20is%20a%20completely%20separate%20file%2C%20created%20from%20scratch%20which%20embodies%20the%20key%20data%20steps%20as%20the%20main%20file.%20Unfortunately%20this%20still%20is%20quite%20large.%20However%20it%20exhibits%20the%20exact%20same%20behaviour%20-%20loading%20to%20Table%20just%20fine%2C%20but%20just%20hanging%20on%20load%20to%20DM.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20probably%20make%20a%20Zip%20with%20the%20Toy%20file%20and%20the%20data%20files%20(in%20a%20subsidiary%20folder)%20if%20that%20helps.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-358667%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-358667%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F289501%22%20target%3D%22_blank%22%3E%40Epee_Sharkey%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20you%20share%20the%20M%20Code%20from%20the%20Advanced%20editor%2C%20I'll%20then%20see%20if%20I%20can%20replicate%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20a%20bug%20you%20can%20go%20to%20File%20%26gt%3B%20Feedback%20%26gt%3B%20Send%20a%20frown%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20682px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84772iB94F352FB626B60F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-358595%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-358595%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F527%22%20target%3D%22_blank%22%3E%40Ed%20Hansberry%3C%2FA%3E%26nbsp%3B-%20a%20quick%20coda%20on%20this%20one.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20bit%20the%20bullet%20and%20re-created%20my%20workbook.%20This%20time%20I%20consciously%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20set%20up%20the%20G%26amp%3BT%20script%20so%20that%20it%20only%20did%20normal%20processing%2C%20with%20no%20references%20to%20other%20tables.%26nbsp%3B%3C%2FP%3E%3CP%3E-%20this%20successfully%20loaded%20into%20Data%20Model%2C%20where%20I%20recreated%20the%20'merge'%20--%20actually%20I%20managed%20without%20doing%20the%20merges.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOverall%2C%20that%20works%20a%20lot%20faster%20in%20terms%20of%20refresh%26nbsp%3B%20and%20I%20get%20the%20main%20table%20into%20the%20Data%20Model.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20all%20this%20was%20working%2C%20just%20as%20an%20experiment%20I%20went%20back%20to%20the%20Power%20Query%20and%20inserted%20a%20new%20ste.%20This%20was%20enacting%20a%20filter%20to%20keep%20only%20rows%20where%20the%20value%20is%20found%20in%20a%20single-column%20table%20in%20the%20workbook.%20In%20fact%20with%20the%20data%20I%20used%20there%20is%20one%20row%20in%20one%20column%20here.%20That%20'helper%20table'%20is%20loaded%20simply%20through%20the%20'From%20Table'%20button%20on%20the%20Data%20ribbon.%20It%20is%20created%20with%20the%20option%20'Connection%20Only'%20-%20and%20I%20have%20tried%20both%20checking%20and%20un-checking%20Load%20to%20DM%20with%20same%20results.%26nbsp%3B%20Within%20Power%20Query%20the%20step%20(which%20I%20added%20manually%20through%20Advanced%20Editor.)%20works%20fine%2C%20performing%20the%20filter%20just%20as%20expected.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20now%2C%20on%20exiting%20Power%20Query%20via%20Load%20To....%20the%20table%20doesn't%20load%20to%20Data%20Model.%20I%20mean%20even%20after%2015%20-%2020%20minutes%2C%20it%20is%20still%20showing%20Loading%20Data...%20with%20the%20spinning%20wheel%20but%20no%20sign%20of%20progress.%20Maybe%20it%20will%20load%20eventually%20(though%20I%20doubt%20it)%20but%2015%2B%20minutes%20to%20load%20a%20simple%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20reverting%20back%20to%20the%20Power%20Query%20I%20replace%20my%20previous%20edit%2C%20and%20just%20hard-code%20the%20same%20filter%20as%20before.%20Now%20the%20table%20loads%20to%20Data%20Model%20(thankfully%20the%20measures%20etc%20I%20had%20coded%20are%20still%20there).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20me%2C%20this%20seems%20definitive%20proof%20--%20when%20the%20Power%20Query%20contains%20a%20step%20referencing%20a%20table%20within%20the%20Workbook%2C%20then%20it%20doesn't%20load%20to%20the%20Data%20Model%2C%20but%20will%20load%20to%20a%20table%20only.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20try%20some%20smaller%20examples%20to%20explore%20that%20for%20reproducibility.%20Assuming%20it%20does%20reproduce%20--%20is%20there%20a%20place%20to%20report%20this%20as%20a%20bug%20or%20issue%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356570%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356570%22%20slang%3D%22en-US%22%3E%3CP%3EDefinitely%20a%20helpful%20article%2C%20thanks%20for%20linking%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOf%20the%203%20options%2C%20%231%20(save%20as%20.xlsx%20not%20.xls)%20and%20%233%20('circular%20references'%20in%20powerpivot)%20don't%20apply.%26nbsp%3B%3C%2FP%3E%3CP%3E%232%20(temp%20file%20possible%20corruption)%20looks%20interesting.%20Checking%20out%20the%20location%20specified%20indeed%20I%20found%20plenty%20of%20the%20those%20strangely%20name%20folders%20I%20deleted%20all%20of%20them%2C%20and%20restarted.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20Dice.%20Still%20same%20weird%20symptom%2C%20the%20PQ%20runs%20fine%20(it%20is%20actually%20running%20a%20lot%20better%20than%20in%20the%20previous%20incarnation)%20but%20just%20will%20not%20load%20into%20DM.%26nbsp%3B%3C%2FP%3E%3CP%3EFrustrating%2C%20I%20think%20I%20have%20to%20give%20up%20for%20now.%20The%20time%20that%20Excel%20G%26amp%3BT%20has%20saved%20me%20is%20being%20used%20up%20in%20this%20fruitless%20pursuit%20of%20an%20answer.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%20%26amp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F527%22%20target%3D%22_blank%22%3E%40Ed%20Hansberry%3C%2FA%3E%26nbsp%3B%20for%20your%20efforts.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356526%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356526%22%20slang%3D%22en-US%22%3EMaybe%20this%20will%20help.%20%3CA%20href%3D%22https%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fsqlserver%2Fen-US%2Fbc4460d9-2e7a-4ae8-ade0-d299fd1c2b2c%2Fpower-pivot-cannot-save-file-quotobject-reference-not-set-to-an-instance-of-an-objectquot%3Fforum%3Dsqlkjpowerpivotforexcel%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fsqlserver%2Fen-US%2Fbc4460d9-2e7a-4ae8-ade0-d299fd1c2b2c%2Fpower-pivot-cannot-save-file-quotobject-reference-not-set-to-an-instance-of-an-objectquot%3Fforum%3Dsqlkjpowerpivotforexcel%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356508%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356508%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%20Yes%2C%20merges...%20I%20am%20merging%20a%20column%20of%20my%20table%20(considerably%20reduced%20by%20earlier%20filtering%20and%20col%20removal)%20with%20a%20table%20from%20the%20excel%20workbook%20(%20v%20small%20'helper'%20table).%3C%2FP%3E%3CP%3EIn%20fact%20I%20am%20doing%20this%20a%20few%20times.%3C%2FP%3E%3CP%3EMerge%20may%20be%20slow%2C%20but%20before%20discovering%20that%20technique%20I%20had%20been%20using%20a%20list%20comparison%20where%20it%20was%20looking%20for%20values%20in%20each%20row%20of%20a%20given%20column%20in%20a%20Excel%20table%20viewed%20as%20a%20list.%3C%2FP%3E%3CP%3ESo%20I%20reckon%20merge%20probably%20looks%20speedy%20compared%20with%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyway%2C%20my%20rebuilt%20query%20(in%20brand%20new%20workbook)%20is%20basically%20performing%20'OK'%20in%20terms%20of%20time%20to%20load.%3C%2FP%3E%3CP%3EBut%20it%20isn't%20loading%20to%20Data%20Model%2C%20only%20to%20a%20table.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOut%20of%20curiosity%20I%20tried%20loading%20that%20table%20into%20Data%20Model%2C%20and%20that%20throws%20this%20error%20%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84315i4673BDA4A33AE315%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22PPivotError.png%22%20title%3D%22PPivotError.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20that%20a%20routine%20message%20because%20it%20is%20a%20violation%20(why)%20to%20load%20a%20table%20which%20is%20created%20by%20PQ%20but%20NOT%20loaded%20to%20DM%20into%20the%20Data%20Model%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOr%20is%20it%20a%20clue%20why%20I%20cannot%20load%20this%20table%20into%20the%20Data%20Model%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356500%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356500%22%20slang%3D%22en-US%22%3ERegarding%20RAM%20-%20the%20more%20te%20better%20when%20using%2064%20BIt%20Excel.%20Given%20your%20operating%20system%20will%20use%204GB%20then%20that%20doesn%E2%80%99t%20leave%20much%20for%20large%20data%20sets%20%3CBR%20%2F%3E%3CBR%20%2F%3EEssentially%20with%20only%208GB%20of%20RAM%20you%E2%80%99re%20not%20necessarily%20benefitting%20too%20much%20from%20having%2064%20bit%20Excel.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20open%20up%20Task%20Manager%20and%20monitor%20memory%20performance%20while%20your%20query%20is%20running%20you%E2%80%99ll%20probably%20see%20it%20maxing%20out%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%E2%80%99re%20performing%20Merge%20operations%20then%20these%20are%20the%20slowest%20most%20memory%20intensive%20operations.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356491%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356491%22%20slang%3D%22en-US%22%3ECan%20you%20explain%20a%20bit%20more%20about%20filtering%20using%20helper%20tables.%20Are%20you%20doing%20merges%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356395%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356395%22%20slang%3D%22en-US%22%3E%3CP%3EHmm%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F527%22%20target%3D%22_blank%22%3E%40Ed%20Hansberry%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%20I%20found%20that%20re-building%20the%20query%20from%20the%20ground%20up%20in%26nbsp%3Ba%20new%20workbook%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20overall%20refresh%20time%20is%20a%20lot%20faster%20(partly%20because%20I%20am%20filtering%20more%20data%20out)%3C%2FP%3E%3CP%3E-...but%20I%20still%20cannot%20load%20the%20resulting%20table%20to%20DM%20without%20the%20problem%20described%20earlier.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20noticed%20is%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20while%20I%20was%20doing%20ordinary%20point-and-click%20steps%20(finding%20the%20folder%20of%20files%2C%20promoting%20headers%2C%20removing%20unwanted%20columns%2C%20simple%20filtering%20etc)%20all%20seemed%20fine%20the%20table%20would%20load%20to%20DM.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E~-%20when%20I%20added%20some%20more%20complex%20steps%20where%20I%20was%20filtering%20the%20loaded%20table%20against%20some%20helper%20tables%20(which%20are%20small%2C%20only%20~10%20rows%20and%201%20col)%2C%20then%20the%20issues%20seems%20to%20arise.%3C%2FP%3E%3CP%3EThe%20query%20still%20works%2C%20but%20the%20table%20will%20no%20longer%20go%20into%20the%20Data%20Model.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20clues%20as%20to%20why%20this%20might%20be%20happening%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20thought%20I%20have%20is%20that%20I%20could%20move%20the%20steps%20from%20Power%20Query%20and%20add%20them%20into%20the%20Data%20Model%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356285%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356285%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%20-%20thanks%20-%20that%20is%20very%20helpful.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20far%20re-creating%20the%20queries%20in%20a%20new%20blank%20workbook%20seems%20to%20be%20yielding%20promising%20results.%20I%20can%20download%20all%20the%20CSV%20into%20a%20table%20which%20is%20successfully%20going%20into%20DM%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20changed%20settings%20to%20match%20your%20suggestions%2C%20which%20hopefully%20will%20help%20a%20little%20bit.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20laptop%20is%20a%20basic%2C%20i5%208GB%20RAM.%20If%20that%20was%20definitely%20a%20limiting%20factor%20I%20could%20possibly%20justify%20going%20to%2016GB.%20But%20I'm%20not%20keen%20to%20start%20down%20that%20route%20without%20some%20clear%20evidence.%20Are%20there%20any%20tools%20or%20indications%20to%20benchmark%20performance%20%3F%20My%20impression%2C%20based%20on%20the%20fact%20that%20a%20new%20workbook%20is%20performing%20well%20(albeit%20I've%20not%20added%20all%20my%20filtering%20and%20adjustment%20steps)%3C%2FP%3E%3CP%3Eis%20that%20the%20issue%20was%20one%20with%20the%20original%20workbook%20somehow%20getting%20'clogged%20up'%20-%20it%20had%20been%20going%20for%203%20-%204%20months%20with%20a%20steadily%20increasing%20folder%20full%20of%20these%20big%20CSV%20files.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356265%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356265%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20terms%20of%20editing%20queries%20there%20are%20a%20couple%20of%20settings%20you%20can%20switch%20off%20so%20try%20these%20(%20see%20screenshots)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20question%20would%20be%20how%20much%20RAM%20do%20you%20have%20on%20your%20machine.%26nbsp%3B%20Hopefully%20at%20least%2016GB.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20776px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84266iECCC3C131E4FB956%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20810px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84267i35D0F254FB935522%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356135%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356135%22%20slang%3D%22en-US%22%3E%3CP%3EPS%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F527%22%20target%3D%22_blank%22%3E%40Ed%20Hansberry%3C%2FA%3E%26nbsp%3B%20--%20what%20is%20'Data%20Lake'%20and%20where%20can%20I%20find%20more%20info%20about%20it%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356134%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356134%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F527%22%20target%3D%22_blank%22%3E%40Ed%20Hansberry%3C%2FA%3E%26nbsp%3B%20and%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20a%20good%20suggestion%20to%20try%20making%20a%20new%20workbook%2C%20but%20I'm%20struggling%20to%20try%20it%20out%20because%20PQ%20essentially%20has%20become%20unworkable%20in%20the%20original%20book.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20thing%20I%20did%20notice%20is%20under%20Options%20%26amp%3B%20Settings%2FQuery%20Options%2FData%20Load%20%3A%20Data%20Cache%20Management%20options.%20The%20cache%20'tops%20out'%20at%20217%20MB%2C%20I've%20tried%20clearing%20that%20several%20times%20and%20it%20always%20goes%20back%20to%2021.7.%20The%20maximum%20allowed%20is%20at%20the%20default%204096.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIN%20my%20earlier%20question%20about%20caching%20the%20CSV%20files%2C%20I%20was%20not%20expecting%20a%20cache%20to%20be%20persistent%20session%20to%20session%20(would%20be%20nice%20though%20!)%2C%20but%20at%20leat%20persistent%20within%20one%20session%20would%20be%20good.%20As%20far%20as%20I%20can%20see%2C%20there%20is%20no%20caching%20at%20all%20happening%20and%20therefore%20any%20change%20on%20the%20query%20is%20causing%20the%20entire%20set%20of%20files%20to%20be%20loaded%20again.%20Is%20this%20top%20out%20at%2021%2F7%20a%20usual%20thing%20%3F%20Anything%20I%20can%20do%20to%20fix%20that%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%40Why%20Hopkns%20%3A%20you%20sayO365%20version%20may%20be%20more%20stable%20-%20that%20may%20be%20so%20(I%20have%20it%20on%20my%20home%20PC)%2C%20but%20my%20company%20is%20not%20ready%20for%20O365%3B%20I%20had%20to%20make%20a%20business%20case%20for%20getting%20Office%202016%20Pro%2B%20on%20my%20laptop.%20It%20is%20a%20useful%20upgrade%20and%20the%20G%26amp%3BT%20capabilities%20are%20truly%20impressive.%20But%20if%20I%20cannot%20get%20some%20good%20info%20on%20what%20exactly%20are%20the%20capabilities%20and%20limitations%20of%20G%26amp%3BT%20and%20Data%20Model%2C%20then%20it%20becomes%20a%20whole%20lot%20less%20useful.%20To%20be%20clear%20I'm%20not%20expecting%20this%20to%20'just%20work'%3B%20Initially%20when%20I%20tried%20this%20import%20with%20G%26amp%3BT%20on%20a%20single%20CSV%20file%2C%20I%20was%20impressed%20and%20knew%20I%20would%20run%20into%20a%20limit%20on%20%23csv%20files%20given%20their%20size.%20And%20I%20was%20impressed%20it%20kept%20going%20so%20well%20over%20so%20many%20iterations.%20But%20now%20that%20it's%20broken%2C%20I%20cannot%20even%20seem%20to%20get%20back%20to%20a%20stable%20working%20solution%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355944%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355944%22%20slang%3D%22en-US%22%3E%3CP%3EUsing%20Data%20Lake%20works%20faster%20for%20me%20for%20CSV%20files%20(at%20least%20in%20my%20limited%20experience%20one%20larger%20data%20set)%2C%20but%20I'm%20not%20sure%20if%20it%20is%20any%20more%20stable%20for%20loading%20into%20tables%20or%20data%20models.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20be%20inclined%20to%20test%20this%20with%20a%20new%20workbook.%20In%20the%20old%20workbook%2C%20open%20Power%20Query%20and%20select%20ALL%20queries%20and%20copy.%20Close%20Power%20Query%2C%20then%20open%20it%20again%20in%20the%20new%20workbook%20and%20Paste.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20load%20your%20desired%20query%20to%20the%20data%20model.%20That%20will%20be%20a%20fresh%20load.%20You%20could%20also%20test%20this%20with%20Power%20BI%20by%20pasting%20the%20queries%20there%20in%20its%20Power%20Query%20module%2C%20then%20load%20only%20the%20one%20you%20want.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%2C%20even%20on%20the%20Office%20365%20version%20of%20Power%20Pivot%2C%20I've%20seen%20issues%20where%20the%20Data%20Model%20gets%20munged.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%20if%20you%20do%20this%20and%20it%20works%2C%20you%20have%20to%20recreate%20your%20measures%20manually.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355768%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355768%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20will%20likely%20find%20that%20the%20O365%20version%20of%20Power%20Pivot%20is%20more%20stable%20as%20a%20lot%20of%20work%20has%20been%20done%20over%20the%20last%20few%20years.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAre%20you%20able%20to%20get%20access%20to%20the%20Diagram%20view%20in%20the%20Power%20Pivot%20model%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMaybe%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F527%22%20target%3D%22_blank%22%3E%40Ed%20Hansberry%3C%2FA%3E%26nbsp%3B%20can%20shed%20some%20light%20on%20his%20use%20of%20a%20Data%20Lake%20to%20store%20CSV%20files.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355762%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355762%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%20thanks%20for%20the%20quick%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20using%2064-bit%20Excel%202016(standalone%20version%2C%20not%20the%20O365%20one).%20I%20don't%20have%20the%20laptop%20open%20right%20now%2C%20but%20it%20is%20up%20to%20the%20latest%2C%20or%20at%20least%20a%20recent%20patch.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20Load%20to%20Data%20Model%20issue%20is%20that%20I%20can%20load%20to%20Data%20Model%2C%20but%20on%20refresh%20of%20a%20table%20(where%20Load%20to%20DM%20is%20ticked)%2C%20then%20the%20query%20doesn't%20work%2C%20just%20stays%20in%20that%20kind%20of%20starting%20position%20loop%20I%20mentioned.%20The%20only%20way%20out%20is%20to%20untick%20load%20to%20DM%20and%20then%20re-tick.%20Then%20the%20query%20will%20refresh%20and%20the%20data%20loads%20to%20DM.%20But%20in%20the%20meantime%20pivot(s)%20based%20on%20the%20DM%20not%20to%20mention%20measures%20specific%20to%20the%20table%20are%20gone%20!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20this%20happen%20even%20on%20a%20'toy'%20version%20where%20I%20made%20some%20much%20smaller%20files%20(10%2C000%20rows%20an%20a%20lot%20fewer%20columns).%20So%20maybe%20this%20is%20something%20more%20generally%20at%20fault%20with%20my%20Excel%20config%20--%20it%20is%20very%20frustrating%20since%20without%20being%20able%20to%20load%20to%20DM%2C%20I%20cannot%20make%20proper%20Measures%20etc.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20confirming%20the%20situation%20with%20caching%20of%20the%20CSVs%20--%20I%20did%20eventually%20find%20something%20in%20the%20blogosphere%20explaining%20that%20in%20a%20bit%20more%20detail.%20Frustrating%20not%20to%20be%20able%20to%20find%20a%20simple%20comprehensive%20explanation%20of%20what%20are%20the%20capability%20AND%20limitations%20of%20G%26amp%3BT.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20there%20any%20knowledge%20resources%20that%20explain%20this%20in%20more%20detail%20%3F%26nbsp%3BWhile%20my%20CSVs%20are%20large%20(~100MB%20each)%2C%20my%20actual%20final%20table%20is%20much%20more%20compact%20(10%2C000s%20of%20rows%20and%2010s%20of%20columns).%20If%20there%20was%20a%20way%20of%20reading%20them%20in%20more%20effiicently%2C%20that%20could%20work%20really%20well.%20(or%20at%20least%20establish%20what%20is%20the%20'art%20of%20the%20possible'%20).%20Maybe%20I%20can%20find%20something%20that%20works%20solidly%20for%2013%20weeks%20(1%20Q)%2C%20then%20ask%20my%20IT%20colleagues%20to%20provide%20some%20kind%20of%20data-warehouse%20or%20such%20to%20extend%20the%20solution.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355735%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20%3A%20Power%20QUery%20will%20notload%20to%20Data%20Model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355735%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F289501%22%20target%3D%22_blank%22%3E%40Epee_Sharkey%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20version%20of%20Excel%20are%20you%20using%20%3F%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20go%20to%20Data%20Model%20%26gt%3B%20Manage%20Data%20Model%20does%20Power%20Pivot%20open%20up%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAre%20you%20able%20to%20load%20a%20simple%20table%20into%20the%20data%20model%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20terms%20of%20caching%20older%20CSVs%20unfortunately%20this%20is%20not%20currently%20possible.%26nbsp%3B%20The%20entire%20data%20set%20has%20to%20be%20refreshed%20each%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Epee_Sharkey
Occasional Contributor

Background: A PowerQuery had been successfully combining data from a dozen large (101 cols x 100,000 row csv files. The table was extensively cut with ~80% rows filtered out , unwanted cvolumns removed, and some new data columns added. Output was a table loaded to workbook only. This ran successfully over several months with a new CSV data file being added to the list every week. The PQ got somewhat slower, as the data got more extensive, but still ran fine.

 

Problem : on trying to develop this, I wished to be able to load the table to the Workbook Data Model, in order to add some measures, based on ISO Week calendar (e.g. show variationof latest week against average of preceding weeks). Result : if the Query settings are changed to 'Load to Data Model' (irrespective of load to Table, or Connection-only) then the query goes into a spinning-wheel-of-doom. The query shows 'Retrieving Data...' but the row-count never updates nor does it show any source files being loaded.

 

The only way to stop it is to hit ESC, in fact sometimes that doesn't work either and I have to start Task Manager and aim to kill the Excel process; it isn't needed to actually kill it, just to issue the Stop Process command seems to eventually interrupt the loop.

 

Effect : this means I am restricted to loading the combined data into a Table and cannot add context-specific measures.

 

More generally : I am finding Get & Transform powerful for simple use-cases, but in this example, no alone have I found this 'does not load to Data Model' issue but I'm also suffering from a lack of knowleddge and resources on how to optimise the data-load. I am sure there is some ability to cache the data from the older CSVs (only 1 new one added each week), but it is impossible to fnd any decent resources.

 

 

 

19 Replies

Hi @Epee_Sharkey 

 

What version of Excel are you using ?   

 

If you go to Data Model > Manage Data Model does Power Pivot open up

 

Are you able to load a simple table into the data model?

 

In terms of caching older CSVs unfortunately this is not currently possible.  The entire data set has to be refreshed each time.

 

 

Hi @Wyn Hopkins  thanks for the quick reply.

 

I'm using 64-bit Excel 2016(standalone version, not the O365 one). I don't have the laptop open right now, but it is up to the latest, or at least a recent patch. 

 

The Load to Data Model issue is that I can load to Data Model, but on refresh of a table (where Load to DM is ticked), then the query doesn't work, just stays in that kind of starting position loop I mentioned. The only way out is to untick load to DM and then re-tick. Then the query will refresh and the data loads to DM. But in the meantime pivot(s) based on the DM not to mention measures specific to the table are gone ! 

 

I found this happen even on a 'toy' version where I made some much smaller files (10,000 rows an a lot fewer columns). So maybe this is something more generally at fault with my Excel config -- it is very frustrating since without being able to load to DM, I cannot make proper Measures etc. 

 

Thanks for confirming the situation with caching of the CSVs -- I did eventually find something in the blogosphere explaining that in a bit more detail. Frustrating not to be able to find a simple comprehensive explanation of what are the capability AND limitations of G&T. 

 

Are there any knowledge resources that explain this in more detail ? While my CSVs are large (~100MB each), my actual final table is much more compact (10,000s of rows and 10s of columns). If there was a way of reading them in more effiicently, that could work really well. (or at least establish what is the 'art of the possible' ). Maybe I can find something that works solidly for 13 weeks (1 Q), then ask my IT colleagues to provide some kind of data-warehouse or such to extend the solution. 

 

You will likely find that the O365 version of Power Pivot is more stable as a lot of work has been done over the last few years.

 

Are you able to get access to the Diagram view in the Power Pivot model?

 

Maybe @Ed Hansberry  can shed some light on his use of a Data Lake to store CSV files.

Using Data Lake works faster for me for CSV files (at least in my limited experience one larger data set), but I'm not sure if it is any more stable for loading into tables or data models.

 

I'd be inclined to test this with a new workbook. In the old workbook, open Power Query and select ALL queries and copy. Close Power Query, then open it again in the new workbook and Paste. 

 

Now load your desired query to the data model. That will be a fresh load. You could also test this with Power BI by pasting the queries there in its Power Query module, then load only the one you want.

 

Unfortunately, even on the Office 365 version of Power Pivot, I've seen issues where the Data Model gets munged.

 

Unfortunately if you do this and it works, you have to recreate your measures manually.

Thanks @Ed Hansberry  and @Wyn Hopkins 

 

It seems a good suggestion to try making a new workbook, but I'm struggling to try it out because PQ essentially has become unworkable in the original book.

 

One thing I did notice is under Options & Settings/Query Options/Data Load : Data Cache Management options. The cache 'tops out' at 217 MB, I've tried clearing that several times and it always goes back to 21.7. The maximum allowed is at the default 4096.

 

IN my earlier question about caching the CSV files, I was not expecting a cache to be persistent session to session (would be nice though !), but at leat persistent within one session would be good. As far as I can see, there is no caching at all happening and therefore any change on the query is causing the entire set of files to be loaded again. Is this top out at 21/7 a usual thing ? Anything I can do to fix that?

 

@Why Hopkns : you sayO365 version may be more stable - that may be so (I have it on my home PC), but my company is not ready for O365; I had to make a business case for getting Office 2016 Pro+ on my laptop. It is a useful upgrade and the G&T capabilities are truly impressive. But if I cannot get some good info on what exactly are the capabilities and limitations of G&T and Data Model, then it becomes a whole lot less useful. To be clear I'm not expecting this to 'just work'; Initially when I tried this import with G&T on a single CSV file, I was impressed and knew I would run into a limit on #csv files given their size. And I was impressed it kept going so well over so many iterations. But now that it's broken, I cannot even seem to get back to a stable working solution

PS @Ed Hansberry  -- what is 'Data Lake' and where can I find more info about it ?

In terms of editing queries there are a couple of settings you can switch off so try these ( see screenshots)

 

Another question would be how much RAM do you have on your machine.  Hopefully at least 16GB.

 

image.pngimage.png

@Wyn Hopkins  - thanks - that is very helpful.

 

So far re-creating the queries in a new blank workbook seems to be yielding promising results. I can download all the CSV into a table which is successfully going into DM as well.

 

I've changed settings to match your suggestions, which hopefully will help a little bit.

 

My laptop is a basic, i5 8GB RAM. If that was definitely a limiting factor I could possibly justify going to 16GB. But I'm not keen to start down that route without some clear evidence. Are there any tools or indications to benchmark performance ? My impression, based on the fact that a new workbook is performing well (albeit I've not added all my filtering and adjustment steps)

is that the issue was one with the original workbook somehow getting 'clogged up' - it had been going for 3 - 4 months with a steadily increasing folder full of these big CSV files.

 

Hmm,

 

@Ed Hansberry @Wyn Hopkins  I found that re-building the query from the ground up in a new workbook :

 

- overall refresh time is a lot faster (partly because I am filtering more data out)

-...but I still cannot load the resulting table to DM without the problem described earlier.

 

What I noticed is :

 

- while I was doing ordinary point-and-click steps (finding the folder of files, promoting headers, removing unwanted columns, simple filtering etc) all seemed fine the table would load to DM.

 

~- when I added some more complex steps where I was filtering the loaded table against some helper tables (which are small, only ~10 rows and 1 col), then the issues seems to arise.

The query still works, but the table will no longer go into the Data Model.

 

Any clues as to why this might be happening ?

 

One thought I have is that I could move the steps from Power Query and add them into the Data Model ?

Can you explain a bit more about filtering using helper tables. Are you doing merges?
Regarding RAM - the more te better when using 64 BIt Excel. Given your operating system will use 4GB then that doesn’t leave much for large data sets

Essentially with only 8GB of RAM you’re not necessarily benefitting too much from having 64 bit Excel.

If you open up Task Manager and monitor memory performance while your query is running you’ll probably see it maxing out

If you’re performing Merge operations then these are the slowest most memory intensive operations.

 

 

@Wyn Hopkins  Yes, merges... I am merging a column of my table (considerably reduced by earlier filtering and col removal) with a table from the excel workbook ( v small 'helper' table).

In fact I am doing this a few times.

Merge may be slow, but before discovering that technique I had been using a list comparison where it was looking for values in each row of a given column in a Excel table viewed as a list.

So I reckon merge probably looks speedy compared with that.

 

Anyway, my rebuilt query (in brand new workbook) is basically performing 'OK' in terms of time to load.

But it isn't loading to Data Model, only to a table.

 

Out of curiosity I tried loading that table into Data Model, and that throws this error :

PPivotError.png

 

Is that a routine message because it is a violation (why) to load a table which is created by PQ but NOT loaded to DM into the Data Model ?

 

Or is it a clue why I cannot load this table into the Data Model ?

Definitely a helpful article, thanks for linking 

 

Of the 3 options, #1 (save as .xlsx not .xls) and #3 ('circular references' in powerpivot) don't apply. 

#2 (temp file possible corruption) looks interesting. Checking out the location specified indeed I found plenty of the those strangely name folders I deleted all of them, and restarted. 

 

No Dice. Still same weird symptom, the PQ runs fine (it is actually running a lot better than in the previous incarnation) but just will not load into DM. 

Frustrating, I think I have to give up for now. The time that Excel G&T has saved me is being used up in this fruitless pursuit of an answer. 

 

Thanks @Wyn Hopkins  & @Ed Hansberry  for your efforts. 

@Wyn Hopkins @Ed Hansberry - a quick coda on this one. 

 

I bit the bullet and re-created my workbook. This time I consciously 

 

- set up the G&T script so that it only did normal processing, with no references to other tables. 

- this successfully loaded into Data Model, where I recreated the 'merge' -- actually I managed without doing the merges. 

 

Overall, that works a lot faster in terms of refresh  and I get the main table into the Data Model. 

 

Once all this was working, just as an experiment I went back to the Power Query and inserted a new ste. This was enacting a filter to keep only rows where the value is found in a single-column table in the workbook. In fact with the data I used there is one row in one column here. That 'helper table' is loaded simply through the 'From Table' button on the Data ribbon. It is created with the option 'Connection Only' - and I have tried both checking and un-checking Load to DM with same results.  Within Power Query the step (which I added manually through Advanced Editor.) works fine, performing the filter just as expected. 

 

But now, on exiting Power Query via Load To.... the table doesn't load to Data Model. I mean even after 15 - 20 minutes, it is still showing Loading Data... with the spinning wheel but no sign of progress. Maybe it will load eventually (though I doubt it) but 15+ minutes to load a simple 

 

So reverting back to the Power Query I replace my previous edit, and just hard-code the same filter as before. Now the table loads to Data Model (thankfully the measures etc I had coded are still there). 

 

To me, this seems definitive proof -- when the Power Query contains a step referencing a table within the Workbook, then it doesn't load to the Data Model, but will load to a table only. 

 

I will try some smaller examples to explore that for reproducibility. Assuming it does reproduce -- is there a place to report this as a bug or issue?

Hi @Epee_Sharkey 

 

Can you share the M Code from the Advanced editor, I'll then see if I can replicate it.

 

If you have a bug you can go to File > Feedback > Send a frown

 

image.png

@Wyn Hopkins  sorry for the delayed response.

 

I've been having some issues trying to check reproducibility. 

 

My original file is way too big and in any case contains non-public information which is not appropriate to share. 

 

I made a tiny version with a self-contained table created in PQ code, but that actually filters fine against a table from a Worksheet cell range, and loads to the DM just fine. 

 

I also have a toy version of the data, this is a completely separate file, created from scratch which embodies the key data steps as the main file. Unfortunately this still is quite large. However it exhibits the exact same behaviour - loading to Table just fine, but just hanging on load to DM. 

 

I can probably make a Zip with the Toy file and the data files (in a subsidiary folder) if that helps. 

Hi

How many queries are involved? If it's just one then could you just copy and past the M code from the advanced editor. Shouldn't be any security issues with that.

@Wyn Hopkins  you may well be sorry you asked, but here goes.

BTW, my present solution on my full data set (10 - 15 CSV files with ~100,000 rows x 100 columns) is now working really well. Dividing the munge functions between G&T and the DM is giving me what I need*, and it is working faster and more smoothly than before. So I don't have an immediate issue, just a nagging sense of something not being quite right.

(* apart from not being able to filter by table as I explained previously, but I can live with that).

 

Note - this is a 'toy' example using smaller data-sets that I had built just to try out filtering techniques in PQ. But essentially identical to what I was doing on the full data-set.

 

There are 2 key Queries A : Load from folder of CSV files, do some basic filtering and manipulation, resulting in a table. Query B takes that table and does some more complicated operation, the key is using a table (loaded from cells in the workbook) to test a column in the table for presence of text strings.

 

IN checking this for reproducibility, I found that with a very small data set (2 files each of 10 rows), everything worked fine and I could load to the DM no problem. When I increased the size 10 files, each 10,000 rows then :

Query A worked and either loaded to DM or made connection, no problem.

Query B worked on load to Table (or connection only), but ticking the 'Load to DM' meant the query never refreshed. I say 'never' -- I leave it for up to 15/20 minutes and find it is still saying 'retrieving data' and never gets on to incrementing rows.

 

Query A :

let
    Source = Folder.Files("H:\My Documents\SupplyAndDemand\ONDB\ToyData\CSVExtractFruit"),
    #"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from CSVExtractFruit", each #"Transform File from CSVExtractFruit"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from CSVExtractFruit"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from CSVExtractFruit", Table.ColumnNames(#"Transform File from CSVExtractFruit"(#"Sample File"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type text}, {"Column8", type text}, {"Column9", type text}, {"Column10", type text}}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Fruit2018Week49.csv", type text}, {"Week", type text}, {"Market", type text}, {"City", type text}, {"XS_Col1", type text}, {"XS_Col2", type text}, {"What_Ships", type text}, {"Fruit_Desc", type text}, {"Shipment_size", type number}, {"Shipment_Value", Int64.Type}, {"XS_Col3", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type1",{"XS_Col1", "XS_Col2", "XS_Col3"}),
    #"Merged Queries" = Table.NestedJoin(#"Removed Columns",{"Market"},Country_to_include,{"CC_to_include"},"Country_to_include",JoinKind.Inner),
    #"Removed Columns1" = Table.RemoveColumns(#"Merged Queries",{"Country_to_include"}),
    #"Merged Queries1" = Table.NestedJoin(#"Removed Columns1",{"Week"},Weeks_to_include,{"Week"},"Weeks_to_include",JoinKind.Inner),
    #"Removed Columns2" = Table.RemoveColumns(#"Merged Queries1",{"Weeks_to_include"})
in
    #"Removed Columns2"

 

Query B : (doesn't load to DM)

let
    Source = CSVExtractFruit,
    #"Added Custom" = Table.AddColumn(#"Source","US Fruit", each if [Market] = "US" then List.Intersect({Text.Split([Fruit_Desc]," "),{US_Fruit[US_Fruit]}{0}}){0}? else null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "FruitKeyWord", each if Text.Contains([Fruit_Desc], "FRUIT:") then Text.BetweenDelimiters([Fruit_Desc],"FRUIT:"," ") else null),
    #"Merged Columns" = Table.CombineColumns(#"Added Custom1",{"FruitKeyWord", "US Fruit"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"AllFruitFound"),
    #"Filtered Rows" = Table.SelectRows(#"Merged Columns", each ([AllFruitFound] <> "")),
    #"Merged Queries" = Table.NestedJoin(#"Filtered Rows",{"AllFruitFound"},Top_Fruit,{"Top_Fruit"},"Top_Fruit",JoinKind.LeftOuter),
    #"Expanded Top_Fruit" = Table.ExpandTableColumn(#"Merged Queries", "Top_Fruit", {"Top_Fruit"}, {"Top_Fruit.Top_Fruit"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Top_Fruit",{{"Top_Fruit.Top_Fruit", "TopFruitFound"}})
in
    #"Renamed Columns"

 

Example data-file -- first few rows of 10,000

 

WeekMarketCityXS_Col1XS_Col2What_ShipsFruit_DescShipment_sizeShipment_Value
2019-Week07CAToronto  All_FruitAn assortment of FRUIT:Honeydew Couried to dest101
2019-Week07CAOttawa  VegetableShipment of VEG:konjac sent by overland shipping101
2019-Week07USChicago  All_FruitShipment of FRUIT:Redcurrant sent by overland shipping103
2019-Week07CAOttawa  VegetableShipment of VEG:butternut squash Couried to dest10084

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies