Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Filter in MDX Statement

$
0
0

I have a very basic MDX statement which contains a FILTER statement:

WITH

SET [Selected Discipline] AS STRTOSET(@Disciplines, CONSTRAINED)
SET [Selected Department] AS STRTOSET(@Departments, CONSTRAINED)

SET [Selected Departments] AS IIF(@Disciplines = @Departments, 
  FILTER(
    DESCENDANTS([Selected Discipline], [Employee].[DISC - DEPT - EMP].[Department], AFTER), 
    NOT INSTR([Employee].[DISC - DEPT - EMP].CurrentMember.UNIQUE_NAME, "Freelance")),
  DESCENDANTS([Selected Department], [Employee].[DISC - DEPT - EMP].[Department], AFTER))

SET [TTM] AS { LastPeriods(12, StrToMember(@SelectedMonth, CONSTRAINED)) }

SELECT 

{ 
  [Measures].[Employee Hours], 
  [Measures].[Employee Hours %] 
} ON COLUMNS, 

NON EMPTY CROSSJOIN(
[Selected Departments],
[Employee].[Employee Bill Rate].[Employee Bill Rate].ALLMEMBERS,
[Employee].[Employee Level].[Employee Level].ALLMEMBERS,
[TTM]) ,

FILTER ([Employee].[Manager Name].[Manager Name].Members , 

             NOT InStr([Employee].[Manager Name].CurrentMember.MEMBER_NAME, "O-Tern"))

DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS 

FROM [OLSON BI]

WHERE (

[Employee Hours Time Category].[Time Category].&[Client Facing],
[Employee Hours Time Category].[Utilization Category].&[PRODUCTION])

CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, 	FORMATTED_VALUE, FORMAT_STRING, FONT

When running the query, I get the "Failed to parse the query to detect if it is mdx or dmx".

THe qqy=uery is basic enough, but for the life of me can't figure out what is wrong????

Any suggestions woud be greatly appreciated!!

Thanks


A. M. Robinson


Viewing all articles
Browse latest Browse all 10045

Trending Articles



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