dbTalk Databases Forums  

Re: URGENT!~~ How to Distinct Count a Text Measure rather than Numeric measure???

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


Discuss Re: URGENT!~~ How to Distinct Count a Text Measure rather than Numeric measure??? in the microsoft.public.sqlserver.olap forum.



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

Default Re: URGENT!~~ How to Distinct Count a Text Measure rather than Numeric measure??? - 07-02-2003 , 04:59 PM






Hi Martin,

What I am trying to do is get a distinct count of the number of Clients in a
system. The Client Id is an alphanumeric field, a text datatype.

I tried the suggestion below:

1) created new dimension dimClientId from the ClientTable with 1 level
Client Id
2) create calculated Member Distinct Clients (Parent Dimension is Measures)
Count(DISTINCT({[dimClientId].[Client Id].Members}),excludeempty)

but when I browse the data the cells for the calculated member show #ERR.

The message I get when I double click it is:
"Infinite recursion detected during execution of calculated member Distinct
Clients."

I cut and past the query used in the build process and it worked fine.

Any ideas?


Thanks in Advance

Fred

"Martin" <martin.kihl (AT) scania (DOT) com> wrote

Quote:
Hello Ivan

Well you might try to create a dimension of the textfield
that you want to distinct count and then create a
calculated member that that does:

Count(Distinct({[Dimensionname].[Dimension level
name].Members}), ExcludeEmpty)

Best regards

Martin


-----Original Message-----
Hi All,

Hope anyone could tell me the answer of the above
question... Thanks

Ivan



.




Reply With Quote
  #2  
Old   
Fred K
 
Posts: n/a

Default Re: URGENT!~~ How to Distinct Count a Text Measure rather than Numeric measure??? - 07-02-2003 , 06:02 PM






I found a way to make this work.


I created a calculate member as:
Count(CrossJoin({[Clients]}, [dimClientId].[Client Id].Members),
ExcludeEmpty)

This appears to give me what I want.

Fred

"Fred K" <fkilby (AT) co (DOT) marin.ca.us> wrote

Quote:
Hi Martin,

What I am trying to do is get a distinct count of the number of Clients in
a
system. The Client Id is an alphanumeric field, a text datatype.

I tried the suggestion below:

1) created new dimension dimClientId from the ClientTable with 1 level
Client Id
2) create calculated Member Distinct Clients (Parent Dimension is
Measures)
Count(DISTINCT({[dimClientId].[Client Id].Members}),excludeempty)

but when I browse the data the cells for the calculated member show #ERR.

The message I get when I double click it is:
"Infinite recursion detected during execution of calculated member
Distinct
Clients."

I cut and past the query used in the build process and it worked fine.

Any ideas?


Thanks in Advance

Fred

"Martin" <martin.kihl (AT) scania (DOT) com> wrote in message
news:02e501c31abe$f7939aa0$a001280a (AT) phx (DOT) gbl...
Hello Ivan

Well you might try to create a dimension of the textfield
that you want to distinct count and then create a
calculated member that that does:

Count(Distinct({[Dimensionname].[Dimension level
name].Members}), ExcludeEmpty)

Best regards

Martin


-----Original Message-----
Hi All,

Hope anyone could tell me the answer of the above
question... Thanks

Ivan



.






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.