question

MuraliKrishna avatar image
MuraliKrishna asked

How to use like function in MDX

i have an ssrs report which i created by using cube,,,,,i have to find total cost of cost head name which iam getting...but i also want to filter some cost head names total amount which contains allocation in their name i want to find the sum of the cost head names amount which contains allocation in their name........that means LIKE function in sql but when iam trying in MDX iam unable to filter it.... i wrote below query can any please help me how to get this....... with set [myData] as Filter( [Cost Center].[Tree Indicator] .members, [Cost Center].[Tree Indicator].currentMember.name = 'N' ) member [Measures].[Total] as Sum( [myData],[Measures].[Amount] ) MEMBER [Measures].[YTD] AS ( SUM( [Date].[Fin Year Month Name].&[01April]:[Date].[Fin Year Month Name].&[08November], [Measures].[Amount]) ) SET Product AS FILTER( [Parent Cost Head].[Cost Head Name].CHILDREN, vbamdx!INSTR([Parent Cost Head].[Cost Head Name].CURRENTMEMBER.Name,'Allocation',1 >= 1 )) SELECT NON EMPTY {[Measures].[Amount],[Measures].[YTD],[Measures].[Total],[Measures].[AllocationCost]} ON COLUMNS, NON EMPTY {([Parent Cost Head].[Cost Head Name].[Cost Head Name].ALLMEMBERS*[Date].[Month Name].[Month Name].ALLMEMBERS*[Date].[Financial Quarter].[Financial Quarter].ALLMEMBERS* [Finance Indicator].[Fin Indicator Desc].[Fin Indicator Desc].ALLMEMBERS)} ON ROWS FROM (SELECT STRTOSET(@CostCenter , CONSTRAINED) ON 0 FROM (SELECT STRTOSET(@Account_Name , CONSTRAINED) ON 0 FROM (SELECT STRTOSET(@FinancialYear , CONSTRAINED) ON 0 FROM [iFin])))
ssrsmdx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.