PowerPivot issue when trying to enter DAX formula

gino59

Active Member
Joined
Jul 26, 2010
Messages
496
Hi all,

Hoping someone's seen this error message before! In PowerPivot, I have a table (roughly 190k rows). After import, I add a new column to the table. I then try to enter a DAX formula (say =YEAR([DATE])).

I get "Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.

Return argument has an invalid type."

Any ideas? The details drop down box shows
Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.InvalidCastException: Return argument has an invalid type.
   at System.Runtime.Remoting.Proxies.RealProxy.ValidateReturnArg(Object arg, Type paramType)
   at System.Runtime.Remoting.Proxies.RealProxy.PropagateOutParameters(IMessage msg, Object[] outArgs, Object returnValue)
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Office.Interop.Excel._Application.get_ActiveWorkbook()
   at Microsoft.AnalysisServices.XLHost.Addin.GeminiRibbon.currentClientWindow_InFormulaBarChanged(Object sender, EventArgs e)
   at Microsoft.AnalysisServices.XLHost.Modeler.ClientWindow.OnInFormulaBarChanged()
   at Microsoft.AnalysisServices.XLHost.Modeler.ClientWindow.sandboxEditor_InFormulaBarChanged(Object sender, EventArgs e)
   at Microsoft.AnalysisServices.Common.SandboxEditor.OnInFormulaBarChanged(EventArgs e)
   at Microsoft.AnalysisServices.Common.SandboxEditor.formulaBar_Enter(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnEnter(EventArgs e)
   at System.Windows.Forms.Control.NotifyEnter()
   at System.Windows.Forms.ContainerControl.UpdateFocusedControl()

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
    CodeBase: [URL]file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll[/URL]
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime.Internal
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40303.0
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.Internal/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.Internal.dll[/URL]
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll[/URL]
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40303.0
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll[/URL]
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll[/URL]
----------------------------------------
Microsoft.Office.Tools
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40303.0
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.dll[/URL]
----------------------------------------
Microsoft.Office.Tools.Excel.Implementation
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40303.0
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Excel.Implementation/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Excel.Implementation.dll[/URL]
----------------------------------------
Microsoft.Office.Tools.Common.Implementation
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40303.0
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Common.Implementation/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.Implementation.dll[/URL]
----------------------------------------
Microsoft.Office.Tools.Common
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40303.0
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll[/URL]
----------------------------------------
Microsoft.Office.Tools.Excel
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40303.0
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Excel/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Excel.dll[/URL]
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll[/URL]
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll[/URL]
----------------------------------------
Microsoft.AnalysisServices.XLHost.Addin
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.AnalysisServices.XLHost.Addin.DLL[/URL]
----------------------------------------
Microsoft.Office.Tools.Common.v4.0.Utilities
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.30319.1
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.Office.Tools.Common.v4.0.Utilities.DLL[/URL]
----------------------------------------
Microsoft.AnalysisServices.XLHost.Modeler
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.AnalysisServices.XLHost.Modeler.DLL[/URL]
----------------------------------------
Microsoft.AnalysisServices.Common
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.AnalysisServices.Common.DLL[/URL]
----------------------------------------
Microsoft.AnalysisServices.Common.FrontEnd
    Assembly Version: 11.0.0.0
    Win32 Version: 2011.0110.2100.60 ((SQL11_RTM).120210-1612)
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.AnalysisServices.Common.FrontEnd.DLL[/URL]
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll[/URL]
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll[/URL]
----------------------------------------
Microsoft.AnalysisServices.BackEnd
    Assembly Version: 11.0.0.0
    Win32 Version: 2011.0110.2100.60 ((SQL11_RTM).120210-1612)
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.AnalysisServices.BackEnd.DLL[/URL]
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll[/URL]
----------------------------------------
Microsoft.DataWarehouse
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.DataWarehouse.DLL[/URL]
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll[/URL]
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll[/URL]
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll[/URL]
----------------------------------------
Microsoft.AnalysisServices.BackEnd.XmlSerializers
    Assembly Version: 11.0.0.0
    Win32 Version: 2011.0110.2100.60 ((SQL11_RTM).120210-1612)
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.AnalysisServices.BackEnd.XmlSerializers.DLL[/URL]
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.237 (RTMGDR.030319-2300)
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll[/URL]
----------------------------------------
ewrjmfho
    Assembly Version: 11.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll[/URL]
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll[/URL]
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll[/URL]
----------------------------------------
Microsoft.AnalysisServices
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Windows/assembly/GAC_MSIL/Microsoft.AnalysisServices/11.0.0.0__89845dcd8080cc91/Microsoft.AnalysisServices.dll[/URL]
----------------------------------------
WindowsFormsIntegration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll[/URL]
----------------------------------------
PresentationFramework
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll[/URL]
----------------------------------------
PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll[/URL]
----------------------------------------
System.Xaml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298 built by: RTMGDR
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll[/URL]
----------------------------------------
System.Transactions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll[/URL]
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll[/URL]
----------------------------------------
Microsoft.AnalysisServices.AdomdClient
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Windows/assembly/GAC_MSIL/Microsoft.AnalysisServices.AdomdClient/11.0.0.0__89845dcd8080cc91/Microsoft.AnalysisServices.AdomdClient.dll[/URL]
----------------------------------------
Microsoft.SqlServer.Configuration.SString
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.SqlServer.Configuration.SString.DLL[/URL]
----------------------------------------
msmgdsrv
    Assembly Version: 9.0.0.0
    Win32 Version: 2011.0110.2100.060
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20OLEDB/110/msmgdsrv.dll[/URL]
----------------------------------------
SMDiagnostics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll[/URL]
----------------------------------------
System.Runtime.DurableInstancing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.DurableInstancing/v4.0_4.0.0.0__31bf3856ad364e35/System.Runtime.DurableInstancing.dll[/URL]
----------------------------------------
Microsoft.AnalysisServices.Common.FrontEnd.XmlSerializers
    Assembly Version: 11.0.0.0
    Win32 Version: 2011.0110.2100.60 ((SQL11_RTM).120210-1612)
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20Excel%20Client/110/Microsoft.AnalysisServices.Common.FrontEnd.XmlSerializers.DLL[/URL]
----------------------------------------
CustomMarshalers
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll[/URL]
----------------------------------------
office
    Assembly Version: 15.0.0.0
    Win32 Version: 15.0.4128.1025
    CodeBase: [URL]file:///C:/Windows/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll[/URL]
----------------------------------------
msmgdsrv
    Assembly Version: 9.0.0.0
    Win32 Version: 2011.0110.2100.060
    CodeBase: [URL]file:///C:/Program%20Files%20(x86)/Microsoft%20Analysis%20Services/AS%20OLEDB/110/msmgdsrv.dll[/URL]
----------------------------------------
Microsoft.AnalysisServices.Wizard.v1
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2100.60 ((SQL11_RTM).120210-1846 )
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.AnalysisServices.Wizard.v1/v4.0_11.0.0.0__89845dcd8080cc91/Microsoft.AnalysisServices.Wizard.v1.dll[/URL]
----------------------------------------
System.Data.DataSetExtensions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: [URL]file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll[/URL]
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top