1
votes

I am new to Microsoft SQL Server Analysis Services and MDX.

How can I find out the datatype of measures in MDX?

The measures I am trying to find the datatype for are defined using a WITH clause which as I understand means that it is possible for each measure to have multiple datatypes.

2
why do you need the data type? what is the code context of requiring the type? is not knowing the type causing an exception?whytheq
Hi @user2989759 any answer has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this.GregGalloway

2 Answers

3
votes

How about the TypeName function:

WITH
Member [Measures].[My Type] as
TypeName([Measures].[My Other Measure])

Etc...

You are correct that each cell can be a different type of you have a calculations.

0
votes

You need to look via BIDS or Visual Studio.

Use the link provided by @arunbabu : http://beyondrelational.com/modules/12/tutorials/799/tutorials/17951/getting-started-with-ssas-multidimensional-part-7-creating-measures-in-ssas.aspx

Also long-time scholar on analysis services William Pearson has many helpful articles. Here is one about member properties: http://www.databasejournal.com/features/mssql/article.php/3770686/Intrinsic-Member-Properties-The-MEMBERVALUE-Property.htm

A full catalog of his articles on Database journal is here: http://www.databasejournal.com/article.php/1459531