SSAS MDX Query : Like Operator type Example : Like % % search
The Like Operator in TSql is useful like wildcard search . when we have many outputs we can filter our some based on certain input . The same thing we can do in MdX also .
i will explain you with example .
we have folders dimension in whihc we have som many enteries in which if we want to see only those folder names which contain "FolderToWatch"
Then we can achieve this with the help of the filter function .
WITH MEMBER [Measures].[ParameterCaption] AS [Folder].[Folder].CURRENTMEMBER.MEMBER_CAPTION
MEMBERi will explain you with example .
we have folders dimension in whihc we have som many enteries in which if we want to see only those folder names which contain "FolderToWatch"
Then we can achieve this with the help of the filter function .
WITH MEMBER [Measures].[ParameterCaption] AS [Folder].[Folder].CURRENTMEMBER.MEMBER_CAPTION
[Measures].[ParameterValue] AS [Folder].[Folder].CURRENTMEMBER.UNIQUENAME SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue]} ON COLUMNS , NON EMPTY (
FILTER( [Folder].[Folder].
children ,instr([Folder].[Folder].
currentmember.Name , "FolderToWatch") )
)
on rowsFROM
[M2M]
This comment has been removed by the author.
ReplyDelete