Forum Discussion

KeshavK0310's avatar
KeshavK0310
Regular Visitor
2 years ago

connecting power bi with sql server Stored Procedure error

Feedback Type:
Frown (Error)

Error Message:
Error

Stack Trace:
Microsoft.Mashup.Client.UI.Shared.ExceptionResultException
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.RemoteEvaluationContainerFactory.Container.OnException(IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.<>c__DisplayClass3_0`1.<AddHandler>b__0(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

Stack Trace Message:
Error

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.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.Windows.Utilities.PowerBIFormUnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.HandleImportEvaluationException(ExceptionResult exceptionView, Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass89_0.<OnQuerySettingsResolved>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass5_0.<Post>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.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.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.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.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c.<RunApplication>b__6_8()
at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass6_0.<RunApplication>b__0()
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.Windows.IExceptionHandlerExtensions.HandleExceptionsWithNestedTasks(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.RunApplication(String[] args)
at Microsoft.PowerBI.Client.Program.Main(String[] args)


PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.121.903.0","ModuleName":"","Component":"Microsoft.Mashup.Evaluator.EvaluationHost","Error":"Microsoft.Mashup.Client.UI.Shared.ExceptionResultException","MethodDef":"OnException","ErrorOffset":"","ErrorCode":""}

Snapshot Trace Logs:
C:\Users\Administrator\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot6c9f872d-a24f-446e-bd9d-a8c57da4ac39.zip

Model Default Mode:
Import

Model Version:
PowerBI_V3

Performance Trace Logs:
C:\Users\Administrator\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Enabled Preview Features:
PBI_sparklines
PBI_scorecardVisual
PBI_NlToDax
PBI_fieldParametersSuperSwitch
PBI_setLabelOnExportPdf
PBI_dynamicFormatString
PBI_newCard

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PBI_angularRls
PBI_onObject
PBI_oneDriveSave
PBI_oneDriveShare
PBI_gitIntegration

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

ExceptionResultMessage:
The given key was not present in the dictionary.

PowerBIUserFeedbackServices_IsReported:
True

Formulas:


section Section1;

shared LocationInfo = let
Source = Sql.Databases("4.240.64.61,1232"),
z_scope = Source{[Name="z_scope"]}[Data],
dbo_LocationInfo = z_scope{[Schema="dbo",Item="LocationInfo"]}[Data]
in
dbo_LocationInfo;

shared LocationContactMatrixMapping = let
Source = Sql.Databases("4.240.64.61,1232"),
z_scope = Source{[Name="z_scope"]}[Data],
dbo_LocationContactMatrixMapping = z_scope{[Schema="dbo",Item="LocationContactMatrixMapping"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_LocationContactMatrixMapping, each ([ConsigneePerson] = "Y"))
in
#"Filtered Rows";

shared Clust_ClusterMaster = let
Source = Sql.Databases("4.240.64.61,1232"),
z_scope = Source{[Name="z_scope"]}[Data]
in
z_scope;

shared Query1 = let
Source = DateTimeZone.LocalNow
in
Source;

shared #"Invoked Function" = let
Source = Query1(),
#"Converted to Table" = #table(1, {{Source}}),
#"Split Column by Delimiter" = Table.SplitColumn(Table.TransformColumnTypes(#"Converted to Table", {{"Column1", type text}}, "en-IN"), "Column1", Splitter.SplitTextByDelimiter("+", QuoteStyle.Csv), {"Column1.1", "Column1.2"}),
#"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Column1.1", type datetime}, {"Column1.2", type time}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Column1.2"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Column1.1", "Refresh time"}})
in
#"Renamed Columns";

shared #"Wallet Balance" = let
Source = Excel.Workbook(File.Contents("C:\Users\Administrator\Desktop\Gainer Sales Dashboard\Wallet Balance.xlsx"), null, true),
#"Wallet Balance_Sheet" = Source{[Item="Wallet Balance",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"Wallet Balance_Sheet", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"AccountCode", Int64.Type}, {"AccountNo", type text}, {"CurrentBalance", type number}, {"FundMaintain", Int64.Type}, {"AlertLimit", Int64.Type}, {"AllowableLimit", Int64.Type}, {"Location", type text}, {"Dealer", type text}, {"Brand", type text}, {"PoValButLRNot", type number}, {"ClaimValueRaisedbyMe", Int64.Type}, {"ClaimRaisedonMe", Int64.Type}, {"PaymentInstructionsSenttoBank", Int64.Type}, {"OrderPendingForPOConfirmation", type number}, {"SaleRealisationPending", type number}, {"CrAmount", type any}, {"TrnDate", type text}})
in
#"Changed Type";

shared #"Imp Measures" = let
Source = 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 [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Column1"})
in
#"Removed Columns";

shared #"Imp Measures (2)" = let
Source = 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 [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Column1"})
in
#"Removed Columns";

shared UAD_Gainer_SalePurchase = let
Source = Sql.Database("4.240.64.61,1232", "UAD_BI", [Query="Exec UAD_Gainer_SalePurchase_SP"]),
#"Renamed Columns" = Table.RenameColumns(Source,{{"Conf_Time", "Conf_Time(inmin)"}}),
#"Merged Queries" = Table.NestedJoin(#"Renamed Columns", {"buyerlocation"}, UAD_GNR_TGT_LW, {"LocationID"}, "UAD_GNR_TGT_LW", JoinKind.LeftOuter),
#"Expanded UAD_GNR_TGT_LW" = Table.ExpandTableColumn(#"Merged Queries", "UAD_GNR_TGT_LW", {"Location", "LocationID", "Category", "Responsibility", "Year", "Month", "NMPurchaseMT", "NSPur", "MPur"}, {"UAD_GNR_TGT_LW.Location", "UAD_GNR_TGT_LW.LocationID", "UAD_GNR_TGT_LW.Category", "UAD_GNR_TGT_LW.Responsibility", "UAD_GNR_TGT_LW.Year", "UAD_GNR_TGT_LW.Month", "UAD_GNR_TGT_LW.NMPurchaseMT", "UAD_GNR_TGT_LW.NSPur", "UAD_GNR_TGT_LW.MPur"}),
#"Removed Duplicates" = Table.Distinct(#"Expanded UAD_GNR_TGT_LW")
in
#"Removed Duplicates";

shared UAD_GNR_TGT_LW = let
Source = Sql.Database("DESKTOP-1ULGF16", "UAD_Dash_DB_Local", [Query="#(lf)SELECT * FROM UAD_GNR_TGT_LW"]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"BrandID", Int64.Type}, {"DealerID", Int64.Type}, {"LocationID", Int64.Type}}),
#"Removed Duplicates" = Table.Distinct(#"Changed Type", {"LocationID"})
in
#"Removed Duplicates";

shared #"duplicate measure" = let
Source = 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 [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Column1"})
in
#"Removed Columns";

shared Buying_Potential_Compile_Nov_23 = let
Source = Sql.Databases("4.240.64.61,1232"),
UAD_BI = Source{[Name="UAD_BI"]}[Data],
dbo_Buying_Potential_Compile_Nov_23 = UAD_BI{[Schema="dbo",Item="Buying_Potential_Compile_Nov_23"]}[Data]
in
dbo_Buying_Potential_Compile_Nov_23;

shared Query2 = let
Source = Sql.Database("4.240.64.61,1232", "z_scope", [Query="EXEC DBO.USP_rpt_FundsBalance '','','',''"])
in
Source;

2 Replies

  • KeshavK0310 When you connect to the SP, were you able to preview the data in the PQ or did this error pop up before that?

    • KeshavK0310's avatar
      KeshavK0310
      Regular Visitor

      This has been solved. Due to memory cache in power bi desktop it was showing.