cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Error Occurred - Object Reference Not Set as An Instance of an Object

I can't update the connections I have with 5 excel documents that are in my sharepoint. The error in the title is the one that comes out as a notification. Before that notification comes out I use my work credentials and I get a notification that the session has been closed. Help

danielpineda96_0-1638891584747.png

Below I copy the details..

danielpineda96_0-1638891810810.png

danielpineda96_1-1638891837988.pngdanielpineda96_2-1638891879436.png

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

The error "Object reference not set to an instance of an object" is not for anything specific. Issues can be related to different problematic area. You can try this below to search your luck.

1.Download the latest version of Power BI desktop
2.Try to match the version (32/64 bit) between your OS and Power BI desktop software
3.reconnect the data source and then check everything works for you or not after publishing the report

 

 

Best Regards

Lucien

As I saw in another forum post the current version of PBI is having problems with the connections between sharepoint and PBI. Use another computer with the September version of PBI and if you manage to update the data.

Syndicate_Admin
Administrator
Administrator

in
Tabla1_Table;

shared #"Sample File" = let
Source = Folder.Files("C:\Users\daniel.pineda\OneDrive - Unilever\CAM Productivity\Intern Delivery June 2021\Productivity\DATA"),
Navigation1 = Source{0}[Content]
in
Navigation1;

shared #"Transformar archivo" = let
Origen = (Parámetro1 as binary) => let
Origen = Excel.Workbook(Parámetro1, null, true),
Tabla1_Table = Origen{[Item="Tabla1",Kind="Table"]}[Data]
in
Tabla1_Table
in
Origen;

shared #"Info CR" = let
Source = Excel.Workbook(Web.Contents("https://unilever-my.sharepoint.com/:x:/r/personal/daniel_pineda_unilever_com/Documents/Productividad..."), null, true),
Tabla1_Table = Source{[Item="Table1",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Tabla1_Table,{{"Year", Int64.Type}, {"Month", type text}, {"Country", type text}, {"Revenue", Int64.Type}, {"Checkers", Int64.Type}, {"Enlisters", type any}, {"Forklifters", Int64.Type}, {"Cd Cash Time", type number}})
in
#"Changed type";

shared #"Info SV" = let
Source = Excel.Workbook(Web.Contents("https://unilever-my.sharepoint.com/:x:/r/personal/daniel_pineda_unilever_com/Documents/Productividad..."), null, true),
Tabla13_Table = Source{[Item="Table13",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Tabla13_Table,{{"Year", Int64.Type}, {"Month", type text}, {"Country", type text}, {"Revenue", Int64.Type}, {"Checkers", Int64.Type}, {"Enlisters", Int64.Type}, {"Forklifters", Int64.Type}, {"Cash Time CD", type number}})
in
#"Changed type";

shared #"Info GT" = let
Origen = Excel.Workbook(Web.Contents(" https://unilever-my.sharepoint.com/:x:/r/personal/daniel_pineda_unilever_com/Documents/Productivida..."), null, true),
Tabla1_Table = Origen{[Item="Tabla1",Kind="Table"]}[Data],
#"Tipo cambiado" = Table.TransformColumnTypes(Tabla1_Table,{{"Año", Int64.Type}, {"Mes", type text}, {"País", type text}, {"Ingresos", type any}, {"Chequeadores", type any} , {"Alistadores", type any}, {"Montacarguistas", type any}, {"Tiempo Efectivo CD", type number}})
in
#"Tipo cambiado";

shared #"Info HN" = let
Source = Excel.Workbook(Web.Contents("https://unilever-my.sharepoint.com/:x:/r/personal/daniel_pineda_unilever_com/Documents/Productividad..."), null, true),
Tabla1_Table = Source{[Item="Table1",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Tabla1_Table,{{"Year", Int64.Type}, {"Month", type text}, {"Country", type text}, {"Revenue", Int64.Type}, {"Checkers", Int64.Type}, {"Enlisters", Int64.Type}, {"Forklifters", Int64.Type}, {"Cash Time CD", type number}})
in
#"Changed type";

shared #"Info NI" = let
Source = Excel.Workbook(Web.Contents("https://unilever-my.sharepoint.com/:x:/r/personal/daniel_pineda_unilever_com/Documents/Productividad..."), null, true),
Tabla13_Table = Source{[Item="Table13",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Tabla13_Table,{{"Year", Int64.Type}, {"Month", type text}, {"Country", type text}, {"Revenue", Int64.Type}, {"Checkers", Int64.Type}, {"Enlisters", Int64.Type}, {"Forklifters", Int64.Type}, {"Cash Time CD", type number}})
in
#"Changed type";

shared #"General Info" = let
Source = Table.Combine({#"Info CR", #"Info SV", #"Info GT", #"Info HN", #"Info NI"}),
#"Filtered Rows1" = Table.SelectRows(Source, each true),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Filtered Rows1", {{"Year", type text}}, "en-CR"),{"Month", "Year"},Combiner.CombineTextByDelimiter("/", QuoteStyle.None),"Date"),
#"Changed Type" = Table.TransformColumnTypes(#"Combined Columns",{{"Date", type date}, {"Revenue", Int64.Type}, {"Checkers", Int64.Type}, {"Enlisters", Int64.Type}, {"Forklifters", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Effective Time CD] <> null and [Effective Time CD] <> ""),
#"Other columns removed" = Table.SelectColumns(#"Filtered Rows",{"Date", "Country", "Income", "Checkers", "Enlisters", "Forklifts", "Effective Time CD"}),
#"Filtered Rows2" = Table.SelectRows(#"Other Columns Removed", each true)
in
#"Filtered rows2";

shared Countries = let
Origen = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcg5S0lFyzi8uSVQIykxOVIrViVYKDgOKueYoBCfmlCWm5BeBBf08gYJ+QCVFiemlEHUefkAhj/y8lNKixGKwiHsIUMS9NLEkNTcxB6goFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CountryKey = _t, CountryName = _t]),
#"Tipo cambiado" = Table.TransformColumnTypes(Origen,{{"CountryKey", type text}, {"CountryName", type text}})
in
#"Tipo cambiado";

shared MM = let
Origen = Excel.Workbook(File.Contents("C:\Users\daniel.pineda\OneDrive - Unilever\Shared Documents\PRODUCTIVIDAD_CAM_2020\Entrega Intern Junio 2021\Productividad\MM.xlsx"), null, true),
Tabla4_Table = Origen{[Item="Tabla4",Kind="Table"]}[Data],
#"Tipo cambiado" = Table.TransformColumnTypes(Tabla4_Table,{{"Material", Int64.Type}, {"PAL Numerador", Int64.Type}})
in
#"Tipo cambiado";

shared META_INDICADOR = let
Source = Excel.Workbook(File.Contents("C:\Users\daniel.pineda\OneDrive - Unilever\CAM Productivity\Intern Delivery June 2021\Productivity\Productivity Tests.xlsx"), null, true),
#"Filtered Rows" = Table.SelectRows(Source, each true),
META_INDICADOR_Table = #"Filtered Rows"{[Item="META_INDICADOR",Kind="Table"]}[Data],
#"Renamed columns" = Table.RenameColumns(META_INDICADOR_Table,{{"INDICATOR", "DESCRIPCION_INDICADOR"}, {"VALUE", "INDICATOR"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"DATE", type date}, {"CODE", type text}, {"INDICATOR", type number}, {"DESCRIPCION_INDICADOR", type text}, {"META", type number}})
in
#"Changed type";

shared Medidas_Análisis_Meta = let
Origen = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Columna1 = _t]),
#"Tipo cambiado" = Table.TransformColumnTypes(Origen,{{"Columna1", type text}}),
#"Columnas quitadas" = Table.RemoveColumns(#"Tipo cambiado",{"Columna1"})
in
#"Columnas quitadas";

shared Medidas_Análisis_2 = let
Origen = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Columna1 = _t]),
#"Tipo cambiado" = Table.TransformColumnTypes(Origen,{{"Columna1", type text}}),
#"Columnas quitadas" = Table.RemoveColumns(#"Tipo cambiado",{"Columna1"})
in
#"Columnas quitadas";

shared Medidas_Análisis_3 = let
Origen = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Columna1 = _t]),
#"Tipo cambiado" = Table.TransformColumnTypes(Origen,{{"Columna1", type text}}),
#"Columnas quitadas" = Table.RemoveColumns(#"Tipo cambiado",{"Columna1"})
in
#"Columnas quitadas";

shared Medidas_Análisis_0 = let
Origen = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Columna1 = _t]),
#"Tipo cambiado" = Table.TransformColumnTypes(Origen,{{"Columna1", type text}}),
#"Columnas quitadas" = Table.RemoveColumns(#"Tipo cambiado",{"Columna1"})
in
#"Columnas quitadas";

Syndicate_Admin
Administrator
Administrator

Feedback Type:
Frown (Error)

Error Message:
Object reference not set as an instance of an object.

Stack Trace:
System.NullReferenceException
in Microsoft.Mashup.Client.UI.Shared.Controllers.JsonOAuthCredentialData.. ctor(TokenCredential credential)
en Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.ChallengeFloatingDialogBase.JsOAuthDialogResult.ToJson(OAuthDialogResult oAuthDialogResult)
en Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.ChallengeFloatingDialogBase.InvokeChallengeOAuthDialogCallback(IJsHostedScript jsHostedScript, OAuthDialogResult oAuthDialogResult)
en Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

Stack Trace Message:
Object reference not set as an instance of an object.

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
en Microsoft.Mashup.Client.UI.Shared.StackTraceInfo.. ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
en Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
en Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
en Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()
en Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
en Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
en System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
en System.Delegate.DynamicInvokeImpl(Object[] args)
en System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
en System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
en System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
a System.Windows.Forms.Control.InvokeMarshaledCallbacks()
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.UI.Windows.DialogWindowBase.ShowModal(IWindowHandle windowHandle)
en Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__0(IWindowHandle owner)
en Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
en Microsoft.Mashup.Client.UI.Shared.Ux.CredentialsChallengeResolver.ShowResolveDialog(IWindowHandle owner, IUIHost uiHost)
at Microsoft.Mashup.Client.UI.Shared.HtmlControls.Results.Challenge.ChallengeResultHtmlControl.ResolveChallenge()
en System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
en System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
en Microsoft.Mashup.Client.UI.Shared.JsExportWrapper.<>c__DisplayClass13_0.<InvokeMember>b__0()
and Microsoft.Mashup.Client.UI.Windows.JsErrorHandler.WrapInvokeHost(Func'1 invokeHost)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
en Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
en Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_1.<Main>b__2()
en Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
en Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
en Microsoft.PowerBI.Client.Program.Main(String[] args)


PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.99.862.0","ModuleName":"Microsoft.Mashup.Client.UI.dll","Component":"Microsoft.Mashup.Client.UI.Shared.Controllers.JsonOAuthCredentialData","Error":"System.NullReferenceException","MethodDef":".ctor","ErrorOffset":"0"}

Snapshot Trace Logs:
C:\Users\daniel.pineda\Microsoft\Power BI Desktop Store App\FrownSnapShotb0e750a1-4a75-414a-ba8a-75366bc82cc9.zip

Model Default Mode:
Import

Model Version:
PowerBI_V3

Performance Trace Logs:
C:\Users\daniel.pineda\Microsoft\Power BI Desktop Store App\PerformanceTraces.zip

Enabled Preview Features:
PBI_rdlNativeVisual

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_dataPointLassoSelect
PBI_compositeModelsOverAS
PBI_dynamicParameters
PBI_enhancedTooltips
PBI_useModernFormatPane
PBI_scorecardVisual

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

PowerBIUserFeedbackServices_IsReported:
True

Formulas:


section Section1;

shared #"0_CAM REPORTS" = let
Source = Folder.Files("C:\Users\daniel.pineda\OneDrive - Unilever\CAM Productivity\Intern Delivery June 2021\Productivity\DATA"),
#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[ Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Other Columns Removed1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Other Columns Removed1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"Transport Order Number", Int64.Type}, {"Material", Int64.Type}, {"Material Short Text", type text}, {"Ubic.proced.", type text}, {"Destination Location", type text}, {"Theoretical Ctd 'from'", Int64.Type}, {"User", type text}, {"Creation Date", type date}, {"Alm.source type", type text}, {"Destination store type", type text}, {"Transport order start time", type datetime}, {"Transport Order End Time", type datetime}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Transport Order End Time"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Removed Columns",{{"Transport Order Start Time", type time}, {"Source Type", type text}, {"Target Store Type", type text}}),
#"Inserted Time" = Table.AddColumn(#"Changed Type1", "Time", each Time.Hour([Transport Order Start Time]), Int64.Type),
#"Inserted Day" = Table.AddColumn(#"Inserted Time", "Day", each Date.Day([Date Created]), Int64.Type),
#"First characters checked out" = Table.TransformColumns(#"Inserted day", {{"Source.Name", each Text.Start(_, 2), type text}}),
#"Filtered Rows" = Table.SelectRows(#"First Extracted Characters", each ([Target Store Type] <> "902" and [Destination Store Type] <> "904" and [Destination Store Type] <> "910" and [Destination Warehouse Type] <> "911" and [Destination Store Type] <> "913" and [Destination Store Type] <> "916" and [Destination Store Type] <> "920" and [Destination Store Type] <> "921" and [Destination Store Type] <> "922" and [Destination Store Type] <> " 999" and [Destination warehouse type] <> "DEV") and ([Alm.provenance type] <> "200" and [Alm.provenance type] <> "904" and [Alm.provenance type] <> "911" and [Alm.provenance type] <> "913" and [Alm.provenance type] <> "916" and [Alm.provenance type] <> "999" and [Alm.provenance type] <> "DEV")),
#"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"Source.Name", "Country"}}),
#"Inserted Merged Column" = Table.AddColumn(#"Renamed Columns", "País_Alm Proced", each Text.Combine({[Country], [Type alm.provenance]}, "_"), type text),
#"Filtered Rows1" = Table.SelectRows(#"Inserted Merged Column", each ([País_Alm Proced] <> "GT_921" and [País_Alm Proced] <> "GT_922" and [País_Alm Proced] <> "HN_910" and [País_Alm Proced] <> "HN_920" and [País_Alm Proced] <> "HN_921" and [País_Alm Proced] <> "HN_922" and [País_Alm Proced] <> "NI_910" and [País_Alm Proced] <> "NI_920" and [País_Alm Proced] < > "NI_922" and [País_Alm Proced] <> "SV_922")),
#"Inserted Merge Column1" = Table.AddColumn(#"Filtered Rows1", "País_Alm Dest", each Text.Combine({[Country], [Target Store Type]}, "_"), type text),
#"Filtered Rows2" = Table.SelectRows(#"Inserted Column1", each ([País_Alm Dest] <> "GT_360" and [País_Alm Dest] <> "NI_360")),
#"Other columns removed" = Table.SelectColumns(#"Filtered rows2",{"Country", "Material", "Theoretical Ctd 'from'", "User", "Creation date", "Type alm.provenance", "Destination warehouse type", "Time", "Day"}),
#"Merged Queries" = Table.NestedJoin(#"Other Columns Removed", {"Material"}, MM, {"Material"}, "MM", JoinKind.LeftOuter),
#"Expanded MM" = Table.ExpandTableColumn(#"Merged Queries", "MM", {"PAL Numerator"}, {"MM.PAL Numerator"}),
#"Filtered Rows3" = Table.SelectRows(#"Expanded MM", each true)
in
#"Filtered rows3";

shared Parameter1 = #"Sample File" meta [IsParameterQuery=true, BinaryIdentifier=#"Sample File", Type="Binary", IsParameterQueryRequired=true];

shared #"Transform Sample File" = let
Source = Excel.Workbook(Parameter1, null, true),
Tabla1_Table = Source{[Item="Table1",Kind="Table"]}[Data]

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.