dbTalk Databases Forums  

Defining strings in Calculated Members

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


Discuss Defining strings in Calculated Members in the microsoft.public.sqlserver.olap forum.



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

Default Defining strings in Calculated Members - 01-02-2004 , 01:06 PM






I have 2 dimensions I am trying to create rollup grouping
for using calculated members.

The first - Product Line - has values of 1, 2, 7, 8. I
was able to group lines 1 and 7 together by using:

[Product Line].[1] + [Product.Line].[7]

The second field - Product Code - has the following
values: A120, A1F0, B1G0. I need to create a caclulated
member to group based on the 2nd and 3rd position of the
Product Code (i.e. group by pos. 2-3 equals 1F or 1G). I
tried the following code and it doesn't pass the syntax
check. The asterisk (wildcard) is not recognized.

[Product Code].[*1F*] + [Product Code].[*1G*]

I don't see any type of susbstring command I can use to
pull values by position. Anyone ever try something like
this or have any suggestions?

Thanks,
Jim


Reply With Quote
  #2  
Old   
paulchernoch
 
Posts: n/a

Default re: Defining strings in Calculated Members - 01-27-2004 , 12:38 PM






For string manipulation, such as substring, mid, left, and the like, you can reference externally defined functions, such as those in the VBA library, or even create your own and load them up. If you want to use the VBA functions, no action is necessary, since the PivotTable service automatically loads them. Otherwise, you need to issue a "USE LIBRARY" command in MDX

For a list of useable VBA functions, consult

http://msdn.microsoft.com/library/de...sfunct_2wab.as

- Paul

---
Posted using Wimdows.net NntpNews Component - Posted from SQL Servers Largest Community Website: http://www.sqlJunkies.com/newsgroups/

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.