Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Translating from SQL SSAS MDX to BIDS Calculated Members!?

$
0
0

Hello everyone, I am quite new to the SSAS technology, but have built up a cube that appears to be quite reliable and accurate, providing some good data.

 

However, I am now attempting to start more complex data analysis using MDX queries against the cube.

 

I am not sure if I am approacing this the correct way, so please let me know if there is a better way to do what I am attempting.

I can write an MDX query using SQL Server New Query, which executes without error:

 

SELECT [Measures].[Duration] ON 0 FROM [DataCube] WHERE ([Step Entity Status].[Step Entity Status].&[6], FILTER([Process Resolution], [Process Resolution]<>[Process Resolution].[Process Resolution].&[4]));

 

This sucessfully returns the figure I am looking for.

However, in Visual Studio Business Intelligence Development Studio, if I open my cube, navigate to the 'Calculations' tab, and create a new Calculated Member, and paste in the above code, when I click on 'Process', I get the error:

Error 13 MdxScript(Q Flow 54 HAR Dev) (14, 5) Parser: The syntax for 'SELECT' is incorrect.  0 0 

So, I guess that you cannot use the command 'select' in a calculated member?

So i rewrote the code in the calculated member as:

 

([Measures].[Duration],[Step Entity Status].[Step Entity Status].&[6], FILTER([Process Resolution], [Process Resolution]<>[Process Resolution].[Process Resolution].&[4]))


The cube then actually processes without error, and the member appears in my cube 'browser' tab, but when I drag it into 'drop total or detail fields here' section, it shows #VALUE with the error:

 

'The function expects and string or numeric expression for the argument. A tuple set was used'

 

What am I doing wrong here?

 

How do a create a measure that is already filtered by dimension?

Thanks,

 

laz


Laz

Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>