dbTalk Databases Forums  

MDX Help!!! Concating strings

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss MDX Help!!! Concating strings in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SubbuR
 
Posts: n/a

Default MDX Help!!! Concating strings - 07-02-2003 , 01:25 AM







Hi,

How do i concat 2 strings. I tried using "Generate" function but was
not able to achive what i wanted. Please let me know the exact way
of doing this.
Also, i wanted to know how to concat a measure and a string.
for eample..
i have a calculated member "A" which has values 90 , 78.5 etc and i want
another calculated member "B" to diplay values like 90% , 78.5%
(i,e conact "A" and %)
if the format string is changed to percentage, and id calc mem "A" is
used in the reports it displays 0.9 , 0.78 etc Please help

--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
Matt Carroll [MS]
 
Posts: n/a

Default Re: MDX Help!!! Concating strings - 07-02-2003 , 02:05 PM






You can use VBA function CStr() to convert the measures value to a string
and then use + to concatinate.
Eg. CStr([Measures].[Amount]) + "%"

Alternatively your calculated member can take the base value divide by 100
and then use the % format string.

Hope this helps,
- Matt Carroll
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"SubbuR" <member32329 (AT) dbforums (DOT) com> wrote

Quote:
Hi,

How do i concat 2 strings. I tried using "Generate" function but was
not able to achive what i wanted. Please let me know the exact way
of doing this.
Also, i wanted to know how to concat a measure and a string.
for eample..
i have a calculated member "A" which has values 90 , 78.5 etc and i want
another calculated member "B" to diplay values like 90% , 78.5%
(i,e conact "A" and %)
if the format string is changed to percentage, and id calc mem "A" is
used in the reports it displays 0.9 , 0.78 etc Please help

--
Posted via http://dbforums.com



Reply With Quote
  #3  
Old   
SubbuR
 
Posts: n/a

Default Re: MDX Help!!! Concating strings - 07-02-2003 , 11:53 PM




Hi,

I want to concat the strings a member with %. How do I
achieve this.
ex, if ([Measures].[Amount]) = 98 then i want to display it as 98 %.
"Changing the format to Percent is not required in this context".

I tried executing the following query
CStr([Measures].[Amount]) + "%" does not function properly. It dvides
the amount by 100. Similarly, ..+"-" , ... + "+" also donnot function
as expected. However, CStr([Measures].[Amount]) + "XYZ" works fine. It
concats the amount with "XYZ".

Please help me.

Thanks and regards
Subbu

--
Posted via http://dbforums.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.