SSAS Mdx Query : How to Write MDX equalent to T-SQL WHERE clause

when we are trying get the result  where 2 measures are not equal .

For example :  generally number of files recived should be equal to number of files processed . if there are any difference then there is an issue happened.

To identify those records in Tsql we use WHERE cluase to Filter those records .

In MDX we need to use Filter ()  function .


SELECT NON EMPTY { [Measures].[Number Of Files Recieved] , [Measures].[Number of Files Processed]} ON COLUMNS,
  Filter(
    [Date].[Hierarchy].[Date].ALLMEMBERS,
    ([Measures].[Number of Files Processed]<> [Measures].[Number Of Files Recieved] )
        ) ON ROWS
FROM [M2M] ;

Comments

Popular posts from this blog

SSAS : A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. (Microsoft.AnalysisServices.AdomdClient). + Solution

SSIS Error : Unable to infer the XSD from the XML file. The XML contains multiple namespaces