Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, I receive the following error when refreshing my Queries: "Object reference not set to an instance of an object".
Below is the detail of the error. Not sure what i should do at this point. Any help would be truly apperiated.
Thank you
Roham
Feedback Type:
Frown (Error)
Timestamp:
2017-12-24T02:27:06.4964594Z
Local Time:
2017-12-23T20:27:06.4964594-06:00
Session ID:
9797ebbf-f5af-4f5a-8fa9-a3d08a5ccac5
Release:
December 2017
Product Version:
2.53.4954.621 (PBIDesktop) (x64)
Error Message:
Object reference not set to an instance of an object.
Stack Trace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.PowerBI.Client.Windows.PowerBIQueryExtensions.QueryFormulasInfo.FromQueryWithReferences(PackageEditor packageEditor, String formulaText, FormulaTextCollection formulaCollection)
at Microsoft.Mashup.Host.Document.Model.Queries.InvokeWithPackageEditor[T](Nullable`1 changeReason, Func`2 action)
at Microsoft.PowerBI.Client.Windows.PowerBIQueryExtensions.QueryFormulasInfo.FromQueryWithReferences(Query query, Boolean currentFormulas)
at Microsoft.PowerBI.Client.Windows.PowerBIQueryExtensions.GetColumnNameMapList(Query query, IEnumerable`1 oldColumnNames, IEnumerable`1 newColumnNames)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.EditTableInfoVisitor.Visit(ISimpleQueryMappingInput tableInput)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.<>c__DisplayClass4.<GetQueryLoadReason>b__3(ITableInput ti)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.GetQueryLoadReason(IAnalysisServicesLoadInput loadInput, IDataModel dataModel, Func`2 getTableInputs)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelLoader.CreateQueryLoadReasonsDictionary()
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelLoader..ctor(WindowsHost windowsHost, IExceptionHandler exceptionHandler, IWin32Window ownerWindow, IPowerBIWindowService windowService, IModelProxy modelProxy, IModelAuthoringService modelAuthoringService, IEnumerable`1 loadInputs, Report report, IQueryServices queryServices, IAnalysisServicesLoadContextFactory loadContextFactory, AnalysisServicesLoadToken loadToken, ICacheSession cacheSession)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelLoader.<>c__DisplayClass1.<LoadTablesAsync>b__0(Object state)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Exception exception)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWin32Window activeWindow, WindowsHost windowsHost, FeedbackPackageInfo feedbackPackageInfo, Exception e)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3.<SendAndMarshalExceptions>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.Ux.FloatingDialog.FloatingDialog.ShowDialogWithTimeout(IWin32Window owner, Nullable`1 showTimeout)
at Microsoft.Mashup.Client.ClientShared.Ux.WindowService.ShowDialogWithTimeout(FloatingDialog dialog, Nullable`1 showTimeout)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.StartEvaluationAndShowDialog(IWindowService windowService, IEnumerable`1 queriesToLoad, Nullable`1 showTimeout, Boolean requireFullDataRefresh)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.TryShowDialogForQueries(Report report, IWin32Window ownerWindow, IWindowService windowService, WindowsHost windowsHost, IQueryServices queryServices, IEnumerable`1 queriesToLoad, String loadReason, LocalizedString title, Boolean requireFullDataRefresh)
at Microsoft.PowerBI.Client.Windows.MainWindow.RefreshAllQueries(String refreshReason)
at Microsoft.Mashup.Client.Windows.UICommands.CommandActionHandlerBase.CommandAction(UInt32 commandId)
at Microsoft.Mashup.Client.Windows.Ribbon.RibbonCommandHandler.Execute(UInt32 commandId, CommandExecutionVerb verb, PropertyKeyRef keyRef, PropVariantRef currentValue, IUISimplePropertySet commandExecutionProperties)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass7.<HandleExceptionsWithNestedTasks>b__6()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
OS Version:
Microsoft Windows NT 10.0.16299.0 (x64 en-US)
CLR Version:
4.7 or later [Release Number = 461308]
Peak Virtual Memory:
33.8 GB
Private Memory:
309 MB
Peak Working Set:
425 MB
IE Version:
11.125.16299.0
User ID:
b5ef949b-c84f-4663-988b-9e4ca5027ac3
Workbook Package Info:
1* - en-US, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.
Telemetry Enabled:
True
Model Default Mode:
Import
Snapshot Trace Logs:
C:\Users\Roham\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot697562171.zip
Performance Trace Logs:
C:\Users\Roham\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip
Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_EnableReportTheme
PBI_numericSlicerEnabled
PBI_SpanishLinguisticsEnabled
PBI_daxTemplatesEnabled
CustomConnectors
PBI_reportBookmarks
PBI_AdobeAnalytics
PBI_qnaExplore
Disabled DirectQuery Options:
PBI_DirectQuery_Unrestricted
Cloud:
GlobalCloud
WER Parameters:
{"AppName":"PBIDesktop","AppVersion":"2.53.4954.621","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.PowerBIQueryExtensions+QueryFormulasInfo","Error":"System.NullReferenceException","MethodDef":"FromQueryWithReferences","ErrorOffset":"0"}
WER Reported:
True
DPI Scale:
100%
Supported Services:
Power BI
Formulas:
section Section1;
shared #"Order Line" = let
Source = Salesforce.Data(),
ECS__eCommSource_Order_Line__c = Source{[Name="ECS__eCommSource_Order_Line__c"]}[Data],
#"Added Conditional Column2" = Table.AddColumn(ECS__eCommSource_Order_Line__c, "Custom", each if [ECS__Product_Cost__c] >= 0 then "A" else if [ECS__Product_Cost__c] >= 10 then "B" else null),
#"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column2",{"IsDeleted", "CreatedById", "LastModifiedById", "LastActivityDate", "ECS__Campaign__c", "ECS__Commission__c", "ECS__Converted_Shipping__c", "ECS__Fulfillment_Fees__c", "ECS__Product_Title__c", "Image__c", "ECS__Just_in_Time_Received__c", "CloudConversion__eBayOrderId__c", "ECS__WarehouseLocationType__c", "CloudConversion__Listing__c", "eCommazon__FBA_Per_Order_Fulfillment_Fee__c", "eCommazon__FBA_Weight_Based_Fee__c", "ECS__Shipping_Discount__c", "ECS__Image__c", "ECS__Status_of_Order__c", "ECS__Title__c", "ECS__Supplier_Name__c", "ECS__Bundle__c", "shipstation__CustomsDeclaredValue__c", "eCommazon__Variable_Closing_Fee__c", "ECS__Sort_Order__c", "eCommazon__FBA_per_Unit_Fulfillment_Fee__c", "eCommazon__Giftwrap_Chargeback__c", "eCommazon__Refund_Commission__c", "ECS__Distribution_Center_Product__c", "ECS__Quote_Line__c", "ECS__Supplier_Product__c", "ECS__BundleId__c", "UPC__c", "Customer_Email__c", "ECS__Fulfillment_Partner__c", "ECS__NewSKU__c", "ECS__Supplier__c", "ECS__Supplier_Price__c", "serp__Purchase_Order_ID__c", "SystemModstamp", "LastViewedDate", "LastReferencedDate", "ECS__Account__c", "ECS__Converted_Discount_Amount__c", "ECS__Converted_Order_Line_Total__c", "ECS__Converted_Tax__c", "ECS__Converted_Unit_Price__c", "ECS__Drop_Shipped__c", "ECS__Exclude_from_Order_SKUs__c", "ECS__Gift_Message__c", "ECS__Shipping_Amount_Weighted_Average__c", "ECS__Tax_Exempt__c", "ARN_SHIPMENT__c", "CloudConversion__eBay_Transaction_Id__c", "Distribution_Center_Quantity__c", "Do_not_Send_by_RSL__c", "eCommazon__Shipping_Chargeback__c", "ECS__Warehouse_Location__c", "Has_LDBD__c", "LastModifiedDate", "PA_Quantity__c", "Product_Type__c", "Quantity_On_Hand__c", "Reno_Quantity__c", "RSL_RENO_Quantity__c", "RSL_Scranton_Quantity__c", "RSL_Total_Shipping_weight__c", "RUN_BUNDLE_FLOW__c", "RUN_FLOW__c", "serp__Included_In_Forecast__c", "serp__Order_Status__c", "serp__Purchase_Order__c", "serp__Purchase_Order_Line__c", "serp__Quantity_Recorded__c", "Webgistix__RSL_Warehouse__c"}),
#"Added Conditional Column" = Table.AddColumn(#"Removed Columns", "Created_Date_Year_Legend", each if [CreatedDate] <= #datetime(2014, 12, 31, 0, 0, 0) then 2014 else if [CreatedDate] <= #datetime(2015, 12, 31, 0, 0, 0) then 2015 else if [CreatedDate] <= #datetime(2016, 12, 31, 0, 0, 0) then 2016 else if [CreatedDate] <= #datetime(2017, 12, 31, 0, 0, 0) then 2017 else null),
#"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "Clean Names", each if [ECS__Sale_Source__c] = "AMAZON_US" then "AMZ US" else if [ECS__Sale_Source__c] = "AMAZON_VENDOR_CA" then "VND CA" else if [ECS__Sale_Source__c] = "AMAZON_VENDOR_USA" then "VND US" else if [ECS__Sale_Source__c] = "AMAZON_WEBSTORE_US" then "AMZ US" else if [ECS__Sale_Source__c] = "B2B Website" then "B2B Website" else if [ECS__Sale_Source__c] = "B2B_SAMPLE" then "B2B Sample" else if [ECS__Sale_Source__c] = "beezid" then "Beezid.com" else if [ECS__Sale_Source__c] = "BUY_DOT_COM" then "Buy.com" else if [ECS__Sale_Source__c] = "CHOXI_DOT_COM" then "Choxi.com" else if [ECS__Sale_Source__c] = "COPYWRITER-SAMPLE" then "Copywriter Sample" else if [ECS__Sale_Source__c] = "COUPANG_DOT_COM" then "Coupang.com" else if [ECS__Sale_Source__c] = "DIRECT_SALE" then "SHANY Website" else if [ECS__Sale_Source__c] = "EBAY_STORES" then "Ebay.com" else if [ECS__Sale_Source__c] = "EBAY_US" then "Ebay.com" else if [ECS__Sale_Source__c] = "Fancy" then "Fancy.com" else if [ECS__Sale_Source__c] = "GIVE_AWAY" then "Give Away" else if [ECS__Sale_Source__c] = "Internal Order" then "Internal Order" else if [ECS__Sale_Source__c] = "INTERNAL_ORDER" then "Internal Order" else if [ECS__Sale_Source__c] = "JET" then "Jet.com" else if [ECS__Sale_Source__c] = "Magento" then "SHANY Website" else if [ECS__Sale_Source__c] = "NMR" then "Choxi.com" else if [ECS__Sale_Source__c] = "Overstock" then "Overstock.com" else if [ECS__Sale_Source__c] = "REVIEW_GIFT" then "Review Gift" else if [ECS__Sale_Source__c] = "SELL_ON_SEARS" then "Sears.com" else if [ECS__Sale_Source__c] = "SHANY" then "SHANY Website" else if [ECS__Sale_Source__c] = "SHANY Website" then "SHANY Website" else if [ECS__Sale_Source__c] = "SHANY_B2B" then "B2B SHANY" else if [ECS__Sale_Source__c] = "SHANY_WEBSITE" then "SHANY Website" else if [ECS__Sale_Source__c] = "SHOP_DOT_COM" then "Shop.com" else if [ECS__Sale_Source__c] = "SUPPLIER_SAMPLES" then "Supplier Samples" else if [ECS__Sale_Source__c] = "WALMART_USA_PO" then "WLMT VND" else if [ECS__Sale_Source__c] = "WALMART_USA_RETAIL" then "WLMT Retail" else if [ECS__Sale_Source__c] = "wish" then "Wish.com" else if [ECS__Sale_Source__c] = "WISH_DOT_COM" then "Wish.com" else if [ECS__Sale_Source__c] = "COSTCO_DROPSHIP" then "Costco.com" else null)
in
#"Added Conditional Column1";
@rohampourmehr,
Are you able to apply changes if you remove the last two steps(Add conditional column and Add conditional column 1) in Query Editor?
Regards,
Lydia
Hi Lydia, I'm not able to apply any changes even after removing the last 2 steps.
Thank you.
@rohampourmehr,
Does the error occur before you add extra steps(remove columns, add conditional columns)?
Regards,
Lydia