Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Define measure" doesn't work in Tabular Model. #497

Closed
BillyDark opened this issue Jan 4, 2021 · 14 comments
Closed

"Define measure" doesn't work in Tabular Model. #497

BillyDark opened this issue Jan 4, 2021 · 14 comments

Comments

@BillyDark
Copy link

"Define measure" doesn't work in Tabular Model.
The result is a blank screen.

@marcosqlbi
Copy link
Contributor

Can you provide more details?
DEFINE MEASURE must be part of a query and followed by EVALUATE, I don't understand your statement.

@BillyDark
Copy link
Author

When trying to analyze an existing measure in the model. On the right button on the measure, select "DEFINE MEASURE" and nothing happens.

@marcosqlbi
Copy link
Contributor

Are you connected to a Tabular database with a user that is not an administrator?
If you are an administrator - it should work, we need more details to reproduce the issue.
If you are not an administrator of the database, probably it is a security restriction.
If you connect to Power BI Desktop, you are always an administrator of your database and it should always work.
Please, let us know more details, thanks!

@BillyDark
Copy link
Author

image
Yes, I'm an administrator.

@marcosqlbi
Copy link
Contributor

Can you provide more details, such as:

  • server version
  • database compatibility level

Can you run other DMV such as:
select * from $SYSTEM.MDSCHEMA_MEASURES
select * from $SYSTEM.TMSCHEMA_MEASURES

Are both working?

@BillyDark
Copy link
Author

server version - SQL2019
database compatibility level - 1500

select * from $SYSTEM.MDSCHEMA_MEASURES - works
select * from $SYSTEM.TMSCHEMA_MEASURES - works

@marcosqlbi
Copy link
Contributor

I am not able to reproduce the issue and we have a similar configuration.

Can you confirm that also "Define All Measures (All Tables)" does not work?
Can you also try "Define Filter Dump Measure (All Tables)"?

@BillyDark
Copy link
Author

Dax Studio 2.13.1.386 Crash Report

Windows Version

Microsoft Windows Server 2016 Standard 64-bit (OS Build 14393)

CLR Version

4.0.30319.42000

Exception

Exception Type

System.Reflection.TargetInvocationException

Error Message

Exception has been thrown by the target of an invocation.

Source

mscorlib

Stack Trace

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.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Caliburn.Micro.ActionMessage.<>c.<.cctor>b__33_0(ActionExecutionContext context)
at Caliburn.Micro.ActionMessage.Invoke(Object eventArgs)
at System.Windows.Interactivity.TriggerBase.InvokeActions(Object parameter)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Inner Exception

Exception Type

System.Reflection.TargetInvocationException

Error Message

Exception has been thrown by the target of an invocation.

Source

mscorlib

Stack Trace

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.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Caliburn.Micro.EventAggregator.Handler.Handle(Type messageType, Object message)
at Caliburn.Micro.EventAggregator.<>c__DisplayClass5_1.b__1(Handler handler)
at System.Linq.Enumerable.WhereArrayIterator1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Caliburn.Micro.EventAggregator.<>c__DisplayClass5_0.b__0()
at Caliburn.Micro.EventAggregator.Publish(Object message, Action`1 marshal)

Inner Exception

Exception Type

System.IndexOutOfRangeException

Error Message

There is no row at position 0.

Source

System.Data

Stack Trace

at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)
at ADOTabular.MetaDataVisitorADOMD.GetTmSchemaMeasures(ADOTabularMeasureCollection measures, IADOTabularConnection conn)
at ADOTabular.ADOTabularMeasureCollection..ctor(IADOTabularConnection adoTabConn, ADOTabularTable table)
at ADOTabular.ADOTabularTable.get_Measures()
at ADOTabular.ADOTabularColumn.get_MeasureExpression()
at DaxStudio.UI.ViewModels.MeasureExpressionEditorViewModel.set_Column(QueryBuilderColumn value)
at DaxStudio.UI.ViewModels.DocumentViewModel.Handle(ShowMeasureExpressionEditor message)

Developer Message

DAX Studio Standalone App_DispatcherUnhandledException crash

@dgosbell
Copy link
Contributor

dgosbell commented Jan 5, 2021

When trying to analyze an existing measure in the model. On the right button on the measure, select "DEFINE MEASURE" and nothing happens.

Have you checked the output pane? is there an error message there?

The crash dump looks like it's coming from the Query Builder, not from the Define Measures option. And it looks like it might be from a model with translations. Is this correct - does your model have translations and are you connected to it using a locale with translations?

If so I think I am able to reproduce this issue - however I see an error message in the output pane so I'm not sure if this is the same issue.

@BillyDark
Copy link
Author

BillyDark commented Jan 5, 2021 via email

@dgosbell
Copy link
Contributor

dgosbell commented Jan 5, 2021

Ah sorry, that's my mistake, I made a minor improvement to the error trapping and that is what is generating the error for me. I rolled back to the 2.13.1 code base and it does fail without a message when doing Define Measure against a model with translations when you are connected using a translated locale. So this will be fixed in the 2.14.0 release when it comes out.

@BillyDark
Copy link
Author

BillyDark commented Jan 6, 2021 via email

@dgosbell
Copy link
Contributor

dgosbell commented Jan 7, 2021

Thanks! And when is planned for 2.14.0?

I'm working on finalizing the release now so hopefully sometime within the next week.

@BillyDark
Copy link
Author

Greetings! Can you tell me if there will be a release this week?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants