![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello MDX experts, I have a question regarding concetenation of a string within MDX. You will see 5 products below, but I am trying to add "TestProduct" string to each of the Product members below on the Rows (ie AWC Logo Cap - TestProduct). The commented lines are the ones giving me trouble. WITH SET [ChardonnayChablis] AS '{ [Product].[Product].Children }' //'{ [Product].[Product].Children + StrToMember("- TestProduct") }' //'{ MemberToStr([Product].[Product].CurrentMember) }' SELECT topcount([ChardonnayChablis],5,[Measures].[Order Count]) ON Rows, [Measures].[Order Count] ON Columns FROM [Adventure Works] Sincerely, -Lawrence |
#3
| |||
| |||
|
|
You can't alter the member names in this way. What you could do is to create a calculated measure to display the text you are after. Which is probably only suitable if you are feeding the results into a reporting tool of some sort like Reporting Services. Although you could also use the calculated measure to only return "TestProduct" under certain situations and if you made this measure the first column in the query, it would sit right next to the member name. WITH SET [ChardonnayChablis] AS '{ [Product].[Product].Children }' MEMBER Measures.ProdLabel as '{ [Product]. [Product].CurrentMember.Name "- TestProduct"' SELECT topcount([ChardonnayChablis],5,[Measures].[Order Count]) ON Rows, {[Measures].ProdLabel,[Measures].[Order Count]} ON Columns FROM [Adventure Works] -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <F54B2C60-E96D-4E0E-AAE2-E2FEBB99AADB (AT) microsoft (DOT) com>, Lawrence (AT) discussions (DOT) microsoft.com says... Hello MDX experts, I have a question regarding concetenation of a string within MDX. You will see 5 products below, but I am trying to add "TestProduct" string to each of the Product members below on the Rows (ie AWC Logo Cap - TestProduct). The commented lines are the ones giving me trouble. WITH SET [ChardonnayChablis] AS '{ [Product].[Product].Children }' //'{ [Product].[Product].Children + StrToMember("- TestProduct") }' //'{ MemberToStr([Product].[Product].CurrentMember) }' SELECT topcount([ChardonnayChablis],5,[Measures].[Order Count]) ON Rows, [Measures].[Order Count] ON Columns FROM [Adventure Works] Sincerely, -Lawrence |
#4
| |||
| |||
|
|
So there's no way to concatenate two members into one? I am trying to combine two members and store as one in a filter box for user to select on, if you know what I am saying. I guess I am out of luck, and would resort to create another dimension with the data combined. Let me know if there's a workaround, Appreciate it! -Lawrence "Darren Gosbell" wrote: You can't alter the member names in this way. What you could do is to create a calculated measure to display the text you are after. Which is probably only suitable if you are feeding the results into a reporting tool of some sort like Reporting Services. Although you could also use the calculated measure to only return "TestProduct" under certain situations and if you made this measure the first column in the query, it would sit right next to the member name. WITH SET [ChardonnayChablis] AS '{ [Product].[Product].Children }' MEMBER Measures.ProdLabel as '{ [Product]. [Product].CurrentMember.Name "- TestProduct"' SELECT topcount([ChardonnayChablis],5,[Measures].[Order Count]) ON Rows, {[Measures].ProdLabel,[Measures].[Order Count]} ON Columns FROM [Adventure Works] -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <F54B2C60-E96D-4E0E-AAE2-E2FEBB99AADB (AT) microsoft (DOT) com>, Lawrence (AT) discussions (DOT) microsoft.com says... Hello MDX experts, I have a question regarding concetenation of a string within MDX. You will see 5 products below, but I am trying to add "TestProduct" string to each of the Product members below on the Rows (ie AWC Logo Cap - TestProduct). The commented lines are the ones giving me trouble. WITH SET [ChardonnayChablis] AS '{ [Product].[Product].Children }' //'{ [Product].[Product].Children + StrToMember("- TestProduct") }' |
![]() |
| Thread Tools | |
| Display Modes | |
| |