Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I created a new dataset on my company Power BI Service. The dataset is published to my personal workspace for testing. I am using a Power BI Pro license.
I attempted to connect to this dataset via Power BI Desktop but it continuously fails. I also did enable "Direct Query for Power BI Datasets ..." which also seems to be required.
**Below is Copy of the error details from Power BI Desktop**
Feedback Type:
Frown (Error)
Error Message:
Value cannot be null.
Parameter name: Data Source
Stack Trace:
System.ArgumentNullException
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback d, Object state)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.AllowModalDialogs(Action action)
at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.LiveConnectionPropertiesValidator.TryGetValidLiveConnectionProperties(IPowerBIWindowService windowService, ILiveConnectionProperties connectionProperties, Report report, ILiveConnectionCompleter liveConnectionPropertiesCompleter, ILiveConnectionProperties& validLiveConnectionProperties, Boolean& resultIsSameConnection, ValidationStatus& validationStatus)
at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.AreAnalysisServicesConnectionPropertiesValid(IPowerBIWindowService windowService, Report report, ILiveConnectionProperties connectionProperties, AnalysisServicesConnectionMode connectionMode, ILiveConnectionCompleter completer, ILiveConnectionProperties& validConnectionProperties)
at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.ValidateAndCreateAnalysisServicesConnection(ILiveConnectionProperties connectionProperties, Boolean addToFormulaHistory, Boolean isExternalDataset)
at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.<>c__DisplayClass24_0.<<AddPowerBIDatahubSource>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
Stack Trace Message:
Value cannot be null.
Parameter name: Data Source
Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.Windows.Utilities.PowerBIFormUnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted)
at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception)
at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.<>c__DisplayClass24_0.<<AddPowerBIDatahubSource>b__0>d.MoveNext()
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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.PowerBIService.PowerBIServiceConnector.<SelectDatahubArtifactFromPowerBIService>d__13.MoveNext()
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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
at Microsoft.PowerBI.Client.Windows.PowerBIService.Flows.AuthenticatedWebRequestor.<Execute>d__5`1.MoveNext()
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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
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.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_1.<Main>b__3()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.111.590.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.Services.UIBlockingService","Error":"System.ArgumentNullException","MethodDef":"AllowModalDialogs","ErrorOffset":"43"}
Snapshot Trace Logs:
C:\Users\mick.jaeger\Microsoft\Power BI Desktop Store App\FrownSnapShot3e751015-a545-459a-bfb3-0f71e92faa43.zip
Model Default Mode:
Import
Model Version:
PowerBI_V3
Performance Trace Logs:
C:\Users\mick.jaeger\Microsoft\Power BI Desktop Store App\PerformanceTraces.zip
Enabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_azureMapVisual
PBI_compositeModelsOverAS
PBI_enhancedTooltips
PBI_enableWebView2
PBI_sparklines
PBI_scorecardVisual
PBI_fieldParametersSuperSwitch
Disabled Preview Features:
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_b2bExternalDatasetSharing
PQ_WebView2Connector
PBI_NlToDax
PBI_horizontalFusion
PBI_optimizeTabRibbon
PBI_relationshipEditPane
Disabled DirectQuery Options:
TreatHanaAsRelationalSource
Cloud:
GlobalCloud
PowerBIUserFeedbackServices_IsReported:
True
Formulas:
section Section1;
shared dateDimension = let
Source = Sql.Database("mbedw01", "mudbayEDW"),
dbo_dateDimension = Source{[Schema="dbo",Item="dateDimension"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(dbo_dateDimension,{{"calendarMonthNumber", Int64.Type}}),
#"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "calendarYear", "calendarYear - Copy"),
#"Duplicated Column1" = Table.DuplicateColumn(#"Duplicated Column", "calendarMonthNumber", "calendarMonthNumber - Copy"),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Duplicated Column1", {{"calendarMonthNumber - Copy", type text}}, "en-US"),{"calendarYear - Copy", "calendarMonthNumber - Copy"},Combiner.CombineTextByDelimiter(":", QuoteStyle.None),"Year:Month")
in
#"Merged Columns";
shared retailSalesFact = let
Source = Sql.Database("mbedw01", "mudbayEDW"),
dbo_retailSalesFact = Source{[Schema="dbo",Item="retailSalesFact"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_retailSalesFact, each Date.IsInCurrentYear([saleDate]) or Date.IsInPreviousYear([saleDate]))
in
#"Filtered Rows";
shared storeDimension = let
Source = Sql.Database("mbedw01", "mudbayEDW"),
dbo_storeDimension = Source{[Schema="dbo",Item="storeDimension"]}[Data]
in
dbo_storeDimension;
shared storeBudgetsFact = let
Source = Sql.Database("mbedw01", "mudbayEDW"),
dbo_storeBudgetsFact = Source{[Schema="dbo",Item="storeBudgetsFact"]}[Data],
#"Duplicated Column" = Table.DuplicateColumn(dbo_storeBudgetsFact, "budgetYear", "budgetYear - Copy"),
#"Duplicated Column1" = Table.DuplicateColumn(#"Duplicated Column", "budgetMonth", "budgetMonth - Copy"),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Duplicated Column1", {{"budgetMonth - Copy", type text}}, "en-US"),{"budgetYear - Copy", "budgetMonth - Copy"},Combiner.CombineTextByDelimiter(":", QuoteStyle.None),"Year:Month")
in
#"Merged Columns";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mickjaeger ,
In my tests, I can connect to the dataset in power bi normally.So I found the possible cause of the error based on your error message.
As the error message says: "Value cannot be null."
I think you need to make sure that there are no null values involved in your dataset.
There is a post similar to your error that I hope will help you.
Value cannot be null power bi query - Microsoft Power BI Community
Best regards,
Community Support Team Selina zhu