none
Error Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Question

  • Hi,

    I am getting this message opening an Excel file including Get and Transform operations.

    Feedback Type:
    Frown (Error)
    
    Error Message:
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    
    Stack Trace:
    
    Server stack trace: 
       at Microsoft.Mashup.Client.Excel.NativeExcelFunctionsC2R.GetNamedObjects(IntPtr workbookPointer)
       at Microsoft.Mashup.Client.Excel.ExcelHost.<>c__DisplayClass4.<TryGetTableNames>b__3()
       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass6`1.<SendAndMarshalExceptions>b__5()
       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3.<SendAndMarshalExceptions>b__0(Object null)
    
    Exception rethrown at [0]: 
       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions[T](SynchronizationContext context, Func`1 callback)
       at Microsoft.Mashup.Client.Excel.ExcelHost.TryGetTableNames(PackageReference packageReference, String[]& tableNames)
       at Microsoft.Mashup.Host.Document.Evaluation.EvaluatorHost.<CreateSession>b__8(PackageReference packageRef)
       at Microsoft.Mashup.Host.Document.Evaluation.ExcelService.TryGetTableNames(String[]& tableNames)
       at Microsoft.Mashup.Host.Document.Evaluation.Services.RemoteExcelServiceFactory.Stub.OnTableNamesRequest(IMessageChannel channel, TableNamesRequestMessage request)
       at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(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.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
       at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(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.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)
       at Microsoft.Mashup.Host.Document.Analysis.CachingDocumentAnalysisInfo.CachingPartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)
       at Microsoft.Mashup.DocumentHost.DocumentAnalyzer.Analyze(IPartitionAnalysisInfo partitionInfo, AccessRecorder recorder, EvaluationResult2`1 result, Action`1 callback)
       at Microsoft.Mashup.DocumentHost.DocumentAnalyzer.<>c__DisplayClass10.<BeginAnalyzeDocumentPartition>b__d(EvaluationResult2`1 result)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose(Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose[T](Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.LimitedDocumentEvaluatorFactory.Evaluation`1.Complete(EvaluationResult2`1 result)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose(Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose[T](Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.LimitedDocumentEvaluatorFactory.Evaluation`1.Complete(EvaluationResult2`1 result)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose(Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose[T](Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.DocumentEvaluator.<>c__DisplayClass3`1.<BeginGetResult>b__0(EvaluationResult2`1 result)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose(Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose[T](Action`1 callback, EvaluationResult2`1 result, Action action)
       at Microsoft.Mashup.Evaluator.LimitedDocumentEvaluatorFactory.Evaluation`1.Complete(EvaluationResult2`1 result)
       at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation`1.TryComplete(EvaluationResult2`1 result)
       at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.PreviewValueSourceRemoteEvaluation.GetResult(Boolean enableFirewall)
       at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation.Evaluate(Boolean enableFirewall)
       at Microsoft.Mashup.Evaluator.EvaluatorThreadPool.EvaluatorThread(Object state)
       at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o)
    
    Stack Trace Message:
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    
    Invocation Stack Trace:
       at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
       at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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.ThreadContext.LocalModalMessageLoop(Form form)
       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.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.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)
    
    
    Supports Premium Content:
    True
    
    Formulas:
    
    
    section Section1;
    
    shared Data_Total_Entity_Loaded = let
        Source = Table.Combine({Data_Input_Entity}),
        #"Added Conditional Column" = Table.AddColumn(Source, "Keep Row", each if [DataType] = "Direct" and [Relationship] = "Group" or [Relationship] = "ICP" then false else true),
        #"Filtered Rows" = Table.SelectRows(#"Added Conditional Column", each [Relationship] = "Direct")
    in
        #"Filtered Rows";
    
    shared Data_Input_Entity_Group = let
        Source = #"Data_Input_All_Group (Revenues)",
        #"Filtered Rows" = Table.SelectRows(Source, each [#"Entity (HFM)"] = Entity),
        #"Divided Column" = Table.TransformColumns(#"Filtered Rows", {{"Local Currency", each _ / 1000, type number}})
    in
        #"Divided Column";
    
    shared Data_Input_Entity_Loaded = let
        Source = Data_Input_Entity,
        #"Removed Columns (DataType)" = Table.RemoveColumns(Source,{"DataType"}),
        #"Renamed Columns" = Table.RenameColumns(#"Removed Columns (DataType)",{{"Value", "Local Currency"}}),
        #"Multiplied Column" = Table.TransformColumns(#"Renamed Columns", {{"Local Currency", each _ * 1000, type number}}),
        #"Filtered Rows" = Table.SelectRows(#"Multiplied Column", each [Unit Head] <> "Dummy")
    in
        #"Filtered Rows";
    
    shared Data_Input_Entity = let
        Source = Excel.CurrentWorkbook(){[Name="R_Data"]}[Content],
        #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
        #"Removed Top Rows" = Table.Skip(#"Promoted Headers",2),
        #"Removed Columns" = Table.RemoveColumns(#"Removed Top Rows",{"-", "-_1", "Full Year Periodic RV459", "-_2", "-_3", "Full Year Periodic RV419", "-_4", "Full Year YTD RV419", "-_8", "-_9", "Full Year YTD RV459", "-_6", "-_7", "-_5", "Full Year Periodic RV10", "-_10", "Full Year Periodic RV20", "-_11", "-_12", "-_13", "Full Year YTD RV20", "-_14", "Full Year YTD RV10", "-_16", "-_15", "Revenue Category"}),
        #"Unpivoted Only Selected Columns3" = Table.Unpivot(#"Removed Columns", {"January Periodic RV459", "February Periodic RV459", "March Periodic RV459", "April Periodic RV459", "May Periodic RV459", "June Periodic RV459", "July Periodic RV459", "August Periodic RV459", "September Periodic RV459", "October Periodic RV459", "November Periodic RV459", "December Periodic RV459", "January Periodic RV419", "February Periodic RV419", "March Periodic RV419", "April Periodic RV419", "May Periodic RV419", "June Periodic RV419", "July Periodic RV419", "August Periodic RV419", "September Periodic RV419", "October Periodic RV419", "November Periodic RV419", "December Periodic RV419", "January Periodic RV20", "February Periodic RV20", "March Periodic RV20", "April Periodic RV20", "May Periodic RV20", "June Periodic RV20", "July Periodic RV20", "August Periodic RV20", "September Periodic RV20", "October Periodic RV20", "November Periodic RV20", "December Periodic RV20", "January Periodic RV10", "February Periodic RV10", "March Periodic RV10", "April Periodic RV10", "May Periodic RV10", "June Periodic RV10", "July Periodic RV10", "August Periodic RV10", "September Periodic RV10", "October Periodic RV10", "November Periodic RV10", "December Periodic RV10", "January YTD RV459", "February YTD RV459", "March YTD RV459", "April YTD RV459", "May YTD RV459", "June YTD RV459", "July YTD RV459", "August YTD RV459", "September YTD RV459", "October YTD RV459", "November YTD RV459", "December YTD RV459", "January YTD RV419", "February YTD RV419", "March YTD RV419", "April YTD RV419", "May YTD RV419", "June YTD RV419", "July YTD RV419", "August YTD RV419", "September YTD RV419", "October YTD RV419", "November YTD RV419", "December YTD RV419", "January YTD RV20", "February YTD RV20", "March YTD RV20", "April YTD RV20", "May YTD RV20", "June YTD RV20", "July YTD RV20", "August YTD RV20", "September YTD RV20", "October YTD RV20", "November YTD RV20", "December YTD RV20", "January YTD RV10", "February YTD RV10", "March YTD RV10", "April YTD RV10", "May YTD RV10", "June YTD RV10", "July YTD RV10", "August YTD RV10", "September YTD RV10", "October YTD RV10", "November YTD RV10", "December YTD RV10"}, "Attribute", "Value"),
        #"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Only Selected Columns3", "Attribute", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"Month", "View", "Account"}),
        #"Filtered Rows" = Table.SelectRows(#"Split Column by Delimiter", each [#"Entity (HFM)"] <> ""),
        #"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each [Value] <> 0),
        #"Unpivoted Only Selected Columns1" = Table.Unpivot(#"Filtered Rows1", {"Game Changer (HFM)", "Rev. Type (HFM)", "Rev. Activity (HFM)", "Rev. Category (HFM)"}, "Custom3 Revenue Analysis", "Custom3"),
        #"Unpivoted Only Selected Columns" = Table.Unpivot(#"Unpivoted Only Selected Columns1", {"Rev. Activity2 (HFM)"}, "Custom1 Revenue Analysis", "Custom1"),
        #"Added Conditional Column" = Table.AddColumn(#"Unpivoted Only Selected Columns", "Custom4", each if [Relationship Entity] = "DE4543" then "IP_SPTI" else "IP"),
        #"Added Custom" = Table.AddColumn(#"Added Conditional Column", "DataType", each "Direct"),
        #"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Brand Local", type text}, {"Office", type text}, {"Unit", type text}, {"Cost Center (SAP)", type text}, {"Unit Head", type text}, {"Commentary ", type text}, {"Client", type text}, {"Relationship", type text}, {"Practise Revenue Category", type text}, {"Client (HFM)", type text}, {"Month", type text}, {"Account", type text}, {"Value", type number}, {"Custom3", type text}, {"Practise", type text}, {"Gross / Net", type text}, {"Entity (HFM)", type text}, {"Brand Global", type text}, {"Rev. Category", type text}, {"Rev. Type", type text}, {"Rev. Activity", type text}, {"Rev. Game Changer", type text}, {"Year", Int64.Type}, {"Scenario", type text}, {"Rev. Activity2", type text}, {"Custom1", type text}, {"Scenario Year", type text}, {"Relationship Entity Code", type text}, {"Relationship Entity", type text}, {"Rev. Activity 2 Short", type text}, {"Client Type", type text}, {"Custom4", type text}, {"DataType", type text}, {"Load to HFM", type text}, {"Client (Short)", type text}}),
        #"Replaced Value" = Table.ReplaceValue(#"Changed Type",null,"",Replacer.ReplaceValue,{"Commentary "}),
        #"Replaced Value3" = Table.ReplaceValue(#"Replaced Value",null,"",Replacer.ReplaceValue,{"Client (Short)"}),
        #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value3","0","",Replacer.ReplaceText,{"Cost Center (SAP)"}),
        #"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1",null,"[ICP None]",Replacer.ReplaceValue,{"Relationship Entity"}),
        #"Reordered Columns" = Table.ReorderColumns(#"Replaced Value2",{"DataType", "Scenario Year", "Scenario", "Year", "Month", "View", "Entity (HFM)", "Brand Local", "Load to HFM", "Brand Global", "Rev. Activity 2 Short", "Office", "Unit", "Cost Center (SAP)", "Unit Head", "Account", "Gross / Net", "Client", "Client (Short)", "Client Type", "Client (HFM)", "Relationship", "Relationship Entity Code", "Relationship Entity", "Practise", "Practise Revenue Category", "Rev. Activity2", "Rev. Type", "Rev. Game Changer", "Rev. Activity", "Rev. Category", "Custom1 Revenue Analysis", "Custom1", "Custom3 Revenue Analysis", "Custom3", "Custom4", "Commentary ", "Value"})
    in
        #"Reordered Columns";
    
    shared ClientsHFM = let
        Source = Excel.Workbook(File.Contents(Par_SourceLists), null, true),
        HFM_Named_Clients__Base_Table = Source{[Item="HFM_Named_Clients__Base",Kind="Table"]}[Data],
        #"Removed Columns" = Table.RemoveColumns(HFM_Named_Clients__Base_Table,{"2018 Commit Global Client", "HFM.C2 - Client (Sector)", "HFM.C2 - Client Top Parent", "HFM.C2 - Client_Level00", "HFM.C2 - Client_Level00_Sorting", "HFM.C2 - Client_Level01", "HFM.C2 - Client_Level01_Sorting"}),
        #"Added Custom" = Table.AddColumn(#"Removed Columns", "HFM Base Client Dropdown Name", each [#"HFM.C2 - Client Top Parent (Description)"] & " - " & [#"HFM.C2 - Client (Description)"]),
        #"Removed Columns1" = Table.RemoveColumns(#"Added Custom",{"HFM.C2 - Client (Description)", "HFM.C2 - Client Top Parent (Description)"}),
        #"Reordered Columns" = Table.ReorderColumns(#"Removed Columns1",{"HFM Base Client Dropdown Name", "HFM.C2 - Client"}),
        #"Changed Type" = Table.TransformColumnTypes(#"Reordered Columns",{{"HFM Base Client Dropdown Name", type text}, {"HFM.C2 - Client", type text}})
    in
        #"Changed Type";
    
    shared Practises = let
        Source = Excel.Workbook(File.Contents(Par_SourceLists), null, true),
        Tb_Practises_Table = Source{[Item="Tb_Practises",Kind="Table"]}[Data],
        #"Changed Type" = Table.TransformColumnTypes(Tb_Practises_Table,{{"Practise", type text}, {"Practise Lead", type text}, {"Practise Lead Finance", type text}, {"Revenue Category", type text}, {"Comment1", type text}, {"Comment2", type text}, {"Definition", type text}, {"HFM C31", type text}})
    in
        #"Changed Type";
    
    shared Par_SourceLists = "Y:\_Mixed\Planning\2019\Forecast\RF\06\2019 RF_Jun Lists.xlsx" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true];
    
    shared Par_SourceAllData = "Y:\_Mixed\Planning\2019\Forecast\RF\06\2019 RF_Jun All Data.xlsx" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true];
    
    shared Entity = let
        Source = Excel.CurrentWorkbook(){[Name="R_HFM_Dim_Entity"]}[Content],
        #"Uppercased Text" = Table.TransformColumns(Source,{{"Column1", Text.Upper, type text}}),
        #"Trimmed Text" = Table.TransformColumns(#"Uppercased Text",{{"Column1", Text.Trim, type text}}),
        #"Renamed Columns" = Table.RenameColumns(#"Trimmed Text",{{"Column1", "HFM Entity"}}),
        #"HFM Entity" = #"Renamed Columns"{0}[HFM Entity]
    in
        #"HFM Entity";
    
    shared Year = let
        Source = Excel.CurrentWorkbook(){[Name="R_HFM_Dim_Year"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}}),
        #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column1", "HFM Year"}}),
        #"HFM Year" = #"Renamed Columns"{0}[HFM Year]
    in
        #"HFM Year";
    
    shared Scenario = let
        Source = Excel.CurrentWorkbook(){[Name="R_HFM_Dim_Scenario"]}[Content],
        #"Trimmed Text" = Table.TransformColumns(Source,{{"Column1", Text.Trim, type text}}),
        #"Renamed Columns" = Table.RenameColumns(#"Trimmed Text",{{"Column1", "HFM Scenario"}}),
        #"HFM Scenario" = #"Renamed Columns"{0}[HFM Scenario]
    in
        #"HFM Scenario";
    
    shared Offices = let
        Source = Entity_Locations,
        #"Removed Columns" = Table.RemoveColumns(Source,{"Entity"}),
        #"Removed Duplicates" = Table.Distinct(#"Removed Columns"),
        #"Sorted Rows" = Table.Sort(#"Removed Duplicates",{{"City", Order.Ascending}})
    in
        #"Sorted Rows";
    
    shared Entity_Locations = let
        Source = Excel.Workbook(File.Contents(Par_SourceLists), null, true),
        Tb_Entity_Locations_DefinedName = Source{[Item="Tb_Entity_Locations",Kind="DefinedName"]}[Data],
        #"Promoted Headers" = Table.PromoteHeaders(Tb_Entity_Locations_DefinedName, [PromoteAllScalars=true]),
        #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Entity", type text}, {"City", type text}, {"Street", type text}, {"Latitude", type number}, {"Longitude", type number}}),
        #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Street", "Latitude", "Longitude"}),
        #"Filtered Rows" = Table.SelectRows(#"Removed Columns", each ([Entity] <> null))
    in
        #"Filtered Rows";
    
    shared #"Data_Input_All_Group (Revenues)" = let
        Source = #"Data_Input_All (Revenues)",
        #"Renamed Columns1" = Table.RenameColumns(Source,{{"Relationship Entity Code", "Entity (HFM)"}, {"Entity (HFM)", "Relationship Entity Code"}}),
        #"Merged Queries1" = Table.NestedJoin(#"Renamed Columns1",{"Relationship Entity Code"},#"Entity Lists",{"Entity"},"Entity Lists",JoinKind.LeftOuter),
        #"Expanded Entity Lists" = Table.ExpandTableColumn(#"Merged Queries1", "Entity Lists", {"Entity - Name"}, {"Entity - Name"}),
        #"Removed Columns1" = Table.RemoveColumns(#"Expanded Entity Lists",{"Relationship Entity"}),
        #"Renamed Columns2" = Table.RenameColumns(#"Removed Columns1",{{"Entity - Name", "Relationship Entity"}}),
        #"Added Custom (DataType)" = Table.AddColumn(#"Renamed Columns2", "DataType", each "Group"),
        #"Reordered Columns" = Table.ReorderColumns(#"Added Custom (DataType)",{"DataType", "Scenario Year", "Scenario", "Year", "Month", "View", "Entity (HFM)", "Relationship Entity", "Load to HFM", "Brand Local", "Brand Global", "Rev. Activity 2 Short", "Office", "Unit", "Cost Center (SAP)", "Unit Head", "Account", "Gross / Net", "Client", "Client Type", "Client (HFM)", "Relationship", "Relationship Entity Code", "Practise", "Practise Revenue Category", "Rev. Activity2", "Rev. Type", "Rev. Game Changer", "Rev. Activity", "Rev. Category", "Custom1 Revenue Analysis", "Custom1", "Custom3 Revenue Analysis", "Custom3", "Custom4", "Commentary ", "Local Currency"}),
        #"Changed Type" = Table.TransformColumnTypes(#"Reordered Columns",{{"DataType", type text}})
    in
        #"Changed Type";
    
    shared #"Data_Input_All (Revenues)" = let
        Source = Folder.Files("Y:\"),
        #"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name],  Text.From(Year) & " " & Scenario) and Text.EndsWith([Name], "Revenues.xlsm")),
        #"Filtered Hidden Files1" = Table.SelectRows(#"Filtered Rows", each [Attributes]?[Hidden]? <> true),
        #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from Y:\", each #"Transform File from Data_Input_Entity (Revenues)"([Content])),
        #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
        #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from Y:\"}),
        #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from Y:\", Table.ColumnNames(#"Transform File from Data_Input_Entity (Revenues)"(#"Sample File Data_Input_Entity (Revenues)"))),
        #"Removed Columns" = Table.RemoveColumns(#"Expanded Table Column1",{"Source.Name"}),
        #"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"Scenario Year", type text}, {"Scenario", type text}, {"Year", Int64.Type}, {"Month", type text}, {"Load to HFM", type text}, {"View", type text}, {"Entity (HFM)", type text}, {"Relationship Entity", type text}, {"Brand Local", type text}, {"Brand Global", type text}, {"Rev. Activity 2 Short", type text}, {"Office", type text}, {"Unit", type text}, {"Cost Center (SAP)", type any}, {"Unit Head", type text}, {"Account", type text}, {"Gross / Net", type text}, {"Client", type text}, {"Client (Short)", type text}, {"Client Type", type text}, {"Client (HFM)", type text}, {"Relationship", type text}, {"Relationship Entity Code", type text}, {"Practise", type text}, {"Practise Revenue Category", type text}, {"Rev. Activity2", type text}, {"Rev. Type", type text}, {"Rev. Game Changer", type text}, {"Rev. Activity", type text}, {"Rev. Category", type text}, {"Custom1 Revenue Analysis", type text}, {"Custom1", type text}, {"Custom3 Revenue Analysis", type text}, {"Custom3", type text}, {"Custom4", type text}, {"Commentary ", type any}, {"Local Currency", type number}})
    in
        #"Changed Type";
    
    shared #"Transform File from Data_Input_Entity (Revenues)" = let
        Source = (#"Sample File Parameter HFM_Uploadfile" as binary) => let
            Source = Excel.Workbook(#"Sample File Parameter HFM_Uploadfile", null, true),
            Revenues_Table = Source{[Item="Revenues",Kind="Table"]}[Data]
        in
            Revenues_Table
    in
        Source;
    
    shared #"Sample File Data_Input_Entity (Revenues)" = let
        Source = Folder.Files("Y:\"),
        #"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], Text.From(Year) & " " & Scenario) and Text.EndsWith([Name], "Revenues.xlsm")),
        Navigation1 = #"Filtered Rows"{0}[Content]
    in
        Navigation1;
    
    shared #"Account ICP Partner" = let
        Source = Excel.Workbook(File.Contents(Par_SourceLists), null, true),
        Tb_Account_ICP_Partner_Table = Source{[Item="Tb_Account_ICP_Partner",Kind="Table"]}[Data],
        #"Changed Type" = Table.TransformColumnTypes(Tb_Account_ICP_Partner_Table,{{"Account ICP", type text}, {"Account Partner", type text}})
    in
        #"Changed Type";
    
    shared #"Entity Lists" = let
        Source = Excel.Workbook(File.Contents(#"Par_SourceLists"), null, true),
        Entity_Sheet = Source{[Item="Entity",Kind="Sheet"]}[Data],
        #"Promoted Headers" = Table.PromoteHeaders(Entity_Sheet, [PromoteAllScalars=true]),
        #"Removed Other Columns" = Table.SelectColumns(#"Promoted Headers",{"Entity_1", "Entity_Currency", "Entity_Country", "Entity_Region", "Entity_Name"}),
        #"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each [Entity_1] <> null and not Text.StartsWith([Entity_1], "PMED")),
        #"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"Entity_1", "Entity"}, {"Entity_Currency", "Currency"}, {"Entity_Region", "Reporting Country"}}),
        #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Entity - Name", each [Entity] & " - " &[Entity_Name]),
        #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Entity_Name"}),
        #"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"Entity", type text}, {"Currency", type text}, {"Entity_Country", type text}, {"Reporting Country", type text}, {"Entity - Name", type text}})
    in
        #"Changed Type";


    What is causing this?

    Thank you.

    Best

    Christoph

    Tuesday, May 21, 2019 11:06 AM

All replies

  • Hi Christoph,

    We'll need more information to investigate the problem. Can you please share the following details with us?

    1. Your Excel version. Go to File > Account > Product Information and look for Excel version right next to the About button.
    2. Steps that you took before you experienced the problem.
    3. If the problem is happening for a specific workbook only, please share this workbook with me. Just make sure it doesn't contain any sensitive information.


    Guy Hunkin - Excel Team

    Monday, June 3, 2019 12:28 PM
  • Hi Guy,

    thank you for your reply.

    Please find the details as follows:

    1) Version 1808 (Build 10730.20344 Click-to-Run). Microsoft Excel for Office 365 MSO (16.0.10730.20344) 64-bit

    2) Have one file already open with an embedded Power Query. Open another file.

    3) This would be very time consuming. Alternatively I would like to offer to share my screen so you can take a look directly.

    Best

    Christoph

    Tuesday, June 4, 2019 8:29 AM
  • Hi Cristoph,

    The issue was fixed in version 1902 (build 11328.*) and later. Upgrading to the latest Office version should resolve the issue for you. Please refer to the following article for the instructions on how to install the latest Office updates:

    https://support.office.com/en-us/article/install-office-updates-2ab296f3-7f03-43a2-8e50-46de917611c5


    Guy Hunkin - Excel Team

    6 hours 4 minutes ago