dbTalk Databases Forums  

Calculated member - Count function

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


Discuss Calculated member - Count function in the microsoft.public.sqlserver.olap forum.



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

Default Calculated member - Count function - 03-18-2005 , 06:49 AM






Hello

I have te following problem:
I have made a cube with quotations. But a quotation consist of one or more
lines. On each line a product is selected (with price, amount, etc.).

The records in my fact table are quotationlines (not quotation-headers),
because the producthierarchy is linked to the articles (in quotationlines).

I would like to count the quotations (not the lines).
The lines linked to a certain quotation have the same document number.

How can I count the number of quotations, e.g. by using the function
calculated member or...? I have tried something but without a good result.

Can you help me?

Thanks in advance

Hans

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

Default Re: Calculated member - Count function - 03-18-2005 , 10:00 AM






Is the relatoinship between the document number and quotation is one to one?

If then, it's possible to aggregate the document number with aggregation
function of "distinct count". You can set the property of measure in Cube
Editor.

Ohjoo Kwon


"Hans" <Hans (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello

I have te following problem:
I have made a cube with quotations. But a quotation consist of one or more
lines. On each line a product is selected (with price, amount, etc.).

The records in my fact table are quotationlines (not quotation-headers),
because the producthierarchy is linked to the articles (in
quotationlines).

I would like to count the quotations (not the lines).
The lines linked to a certain quotation have the same document number.

How can I count the number of quotations, e.g. by using the function
calculated member or...? I have tried something but without a good result.

Can you help me?

Thanks in advance

Hans



Reply With Quote
  #3  
Old   
hans.de.korte@verder.nl
 
Posts: n/a

Default Re: Calculated member - Count function - 03-25-2005 , 07:53 AM



Thank you,
But I still have a problem. At the Aggregate Function the option 'count
distinct only appears when the source field is an Numeric field type. The
documentnumber I would like to count (distinct count) is a Text-field (e.g.
VF05001234).
Do you have any ideas to solve this problem?
Or is the problem not the field type, but something else I don't know?

Hans

"Ohjoo Kwon" wrote:

Quote:
Is the relatoinship between the document number and quotation is one to one?

If then, it's possible to aggregate the document number with aggregation
function of "distinct count". You can set the property of measure in Cube
Editor.

Ohjoo Kwon


"Hans" <Hans (AT) discussions (DOT) microsoft.com> wrote in message
news:C28A061E-1975-47A9-8DE2-7489FDED0C3B (AT) microsoft (DOT) com...
Hello

I have te following problem:
I have made a cube with quotations. But a quotation consist of one or more
lines. On each line a product is selected (with price, amount, etc.).

The records in my fact table are quotationlines (not quotation-headers),
because the producthierarchy is linked to the articles (in
quotationlines).

I would like to count the quotations (not the lines).
The lines linked to a certain quotation have the same document number.

How can I count the number of quotations, e.g. by using the function
calculated member or...? I have tried something but without a good result.

Can you help me?

Thanks in advance

Hans




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

Default Re: Calculated member - Count function - 03-25-2005 , 08:20 AM



Yes, you are right. It must be numeric.

I recommend you use surrogate key mapped to document number.

Ohjoo Kwon

"hans.de.korte (AT) verder (DOT) nl"
<hans.de.korte (AT) verder (DOT) nl (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thank you,
But I still have a problem. At the Aggregate Function the option 'count
distinct only appears when the source field is an Numeric field type. The
documentnumber I would like to count (distinct count) is a Text-field
(e.g.
VF05001234).
Do you have any ideas to solve this problem?
Or is the problem not the field type, but something else I don't know?

Hans

"Ohjoo Kwon" wrote:

Is the relatoinship between the document number and quotation is one to
one?

If then, it's possible to aggregate the document number with aggregation
function of "distinct count". You can set the property of measure in
Cube
Editor.

Ohjoo Kwon


"Hans" <Hans (AT) discussions (DOT) microsoft.com> wrote in message
news:C28A061E-1975-47A9-8DE2-7489FDED0C3B (AT) microsoft (DOT) com...
Hello

I have te following problem:
I have made a cube with quotations. But a quotation consist of one or
more
lines. On each line a product is selected (with price, amount, etc.).

The records in my fact table are quotationlines (not
quotation-headers),
because the producthierarchy is linked to the articles (in
quotationlines).

I would like to count the quotations (not the lines).
The lines linked to a certain quotation have the same document number.

How can I count the number of quotations, e.g. by using the function
calculated member or...? I have tried something but without a good
result.

Can you help me?

Thanks in advance

Hans






Reply With Quote
  #5  
Old   
hans.de.korte@verder.nl
 
Posts: n/a

Default Re: Calculated member - Count function - 03-29-2005 , 03:29 AM



Thank you!!

"Ohjoo Kwon" wrote:

Quote:
Yes, you are right. It must be numeric.

I recommend you use surrogate key mapped to document number.

Ohjoo Kwon

"hans.de.korte (AT) verder (DOT) nl"
hans.de.korte (AT) verder (DOT) nl (... microsoft.com> wrote in message
news:BB9AA35C-6772-4026-B656-BCC31FF21533 (AT) microsoft (DOT) com...
Thank you,
But I still have a problem. At the Aggregate Function the option 'count
distinct only appears when the source field is an Numeric field type. The
documentnumber I would like to count (distinct count) is a Text-field
(e.g.
VF05001234).
Do you have any ideas to solve this problem?
Or is the problem not the field type, but something else I don't know?

Hans

"Ohjoo Kwon" wrote:

Is the relatoinship between the document number and quotation is one to
one?

If then, it's possible to aggregate the document number with aggregation
function of "distinct count". You can set the property of measure in
Cube
Editor.

Ohjoo Kwon


"Hans" <Hans (AT) discussions (DOT) microsoft.com> wrote in message
news:C28A061E-1975-47A9-8DE2-7489FDED0C3B (AT) microsoft (DOT) com...
Hello

I have te following problem:
I have made a cube with quotations. But a quotation consist of one or
more
lines. On each line a product is selected (with price, amount, etc.).

The records in my fact table are quotationlines (not
quotation-headers),
because the producthierarchy is linked to the articles (in
quotationlines).

I would like to count the quotations (not the lines).
The lines linked to a certain quotation have the same document number.

How can I count the number of quotations, e.g. by using the function
calculated member or...? I have tried something but without a good
result.

Can you help me?

Thanks in advance

Hans







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.