dbTalk Databases Forums  

Dynamic summing of members in AS2000

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


Discuss Dynamic summing of members in AS2000 in the microsoft.public.sqlserver.olap forum.



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

Default Dynamic summing of members in AS2000 - 11-14-2006 , 07:48 AM






Can we achieve a functionality similar to the LIKE operator in SQL?

I have a cube with data as follows:
Measure1
ABC Corp 10
ABC Limited 20
ABC INC 20

These are basically same companies having different names

I want a result set that would display:
Measure2
ABC 50

That is SUM (all members that start with ABC)

this should be dynamic thru MDX .Is there a way for this?

Appreciate your thoughts on the same.

Regards,
Pras


Reply With Quote
  #2  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Re: Dynamic summing of members in AS2000 - 11-14-2006 , 08:31 AM






For filtering, InStr VBA function can be used. For example,

Sum(Filter(Dim.Members, InStr(Dim.CurrentMember.Name, "ABC") > 0), Measure1)

Ohjoo


"pras" <prasannat (AT) gmail (DOT) com> wrote

Quote:
Can we achieve a functionality similar to the LIKE operator in SQL?

I have a cube with data as follows:
Measure1
ABC Corp 10
ABC Limited 20
ABC INC 20

These are basically same companies having different names

I want a result set that would display:
Measure2
ABC 50

That is SUM (all members that start with ABC)

this should be dynamic thru MDX .Is there a way for this?

Appreciate your thoughts on the same.

Regards,
Pras




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

Default Re: Dynamic summing of members in AS2000 - 11-14-2006 , 10:47 PM



Thanks for your response
But the issue is it should be dynamic as i have similar set of records
for many other companies
XYZ 1
XYZ 2
XYZ 3
YY 1
YY 2
YY 3

Appreciate your response again.

Regards,
Pras

Ohjoo Kwon wrote:
Quote:
For filtering, InStr VBA function can be used. For example,

Sum(Filter(Dim.Members, InStr(Dim.CurrentMember.Name, "ABC") > 0), Measure1)

Ohjoo


"pras" <prasannat (AT) gmail (DOT) com> wrote in message
news:1163512081.654564.48880 (AT) e3g2000cwe (DOT) googlegroups.com...
Can we achieve a functionality similar to the LIKE operator in SQL?

I have a cube with data as follows:
Measure1
ABC Corp 10
ABC Limited 20
ABC INC 20

These are basically same companies having different names

I want a result set that would display:
Measure2
ABC 50

That is SUM (all members that start with ABC)

this should be dynamic thru MDX .Is there a way for this?

Appreciate your thoughts on the same.

Regards,
Pras



Reply With Quote
  #4  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Re: Dynamic summing of members in AS2000 - 11-15-2006 , 12:09 AM



I don't understand fully what you mean.

Do you mean creating Grouping members by your criteria dynamically?

"pras" <prasannat (AT) gmail (DOT) com> wrote

Quote:
Thanks for your response
But the issue is it should be dynamic as i have similar set of records
for many other companies
XYZ 1
XYZ 2
XYZ 3
YY 1
YY 2
YY 3

Appreciate your response again.

Regards,
Pras

Ohjoo Kwon wrote:
For filtering, InStr VBA function can be used. For example,

Sum(Filter(Dim.Members, InStr(Dim.CurrentMember.Name, "ABC") > 0),
Measure1)

Ohjoo


"pras" <prasannat (AT) gmail (DOT) com> wrote in message
news:1163512081.654564.48880 (AT) e3g2000cwe (DOT) googlegroups.com...
Can we achieve a functionality similar to the LIKE operator in SQL?

I have a cube with data as follows:
Measure1
ABC Corp 10
ABC Limited 20
ABC INC 20

These are basically same companies having different names

I want a result set that would display:
Measure2
ABC 50

That is SUM (all members that start with ABC)

this should be dynamic thru MDX .Is there a way for this?

Appreciate your thoughts on the same.

Regards,
Pras





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.