0
votes

I tried the MDX Query in SQL correctly But I will insert that query in the VisualStudio(SSAS) in the Calculated Members section, but the process time will be faulty

Select 
[Measures].[Fact Student Status Count]on columns
From [Cube_REG_Amozesh DW]
Where ( [Dim Student Status].[Student Status Key].[Student Status Key]-[Dim Student Status].[Student Status Key].&[0])

I get the following error:

Severity Code Description Project File Line Suppression State Error MdxScript(Cube_REG_Amozesh DW) (2, 5) Parser: The syntax for 'Select' is incorrect. (CREATE DYNAMIC SET CURRENTCUBE.[RegSt] AS Select [Measures].[Fact Student Status Count]on columns from [Cube_REG_Amozesh DW] where ( [Dim Student Status].[Student Status Key].[Student Status Key]-[Dim Student Status].[Student Status Key].&[0]), DISPLAY_FOLDER = 'شاخص' ; ). 0

2
Can you describe what you are trying to accomplish? What is supposed to be contained in the RegSt set? Is that basically the set in the where clause?GregGalloway
i want a count of records from one special fact except one special member whit X valueAtarodi

2 Answers

1
votes

Based on your query, this is what you should be putting in Calculated measure

Sum({[Dim Student Status].[Student Status Key].[Student Status Key]-[Dim Student Status].[Student Status Key].&[0]},[Measures].[Fact Student Status Count]). 

Plus make sure you uses Calculated measure not Set

0
votes

its worked:

CREATE MEMBER CURRENTCUBE.[Measures].RegST AS [Measures].[Fact Student Status Count]-([Measures].[Fact Student Status Count],[Dim Student Status].[Student Status Key].&[0])