dbTalk Databases Forums  

Incorrect Total

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


Discuss Incorrect Total in the microsoft.public.sqlserver.olap forum.



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

Default Incorrect Total - 07-17-2006 , 05:41 PM






I have a distinct count measure that shows proper subtotal but incorrect
Grand Total. For example:

Region Office SubscriptionCount
RegionA Office1 3
Office2 5
RegionA Total 7
RegionB Office1 2
Office2 3
RegionB Total 5
Grand Total 57 (instead of 12)

Note: There are more offices in each region, however, I selected only a
couple from each region. If I select all the offices the Grand Total is
correct.

Any advice would be greatly appreciated
Thanks,
Miroslav

Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Incorrect Total - 07-17-2006 , 05:52 PM






do you have any other members?
can you send the MDX query?
the result appear to not be a visualtotal, its why the total is different.
(grand total = All Region * All Offices; visual total will evaluate only the
totals for the selected members)

also, do you use a many-many relationship? (AS2005 only)

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote

Quote:
I have a distinct count measure that shows proper subtotal but incorrect
Grand Total. For example:

Region Office SubscriptionCount
RegionA Office1 3
Office2 5
RegionA Total 7
RegionB Office1 2
Office2 3
RegionB Total 5
Grand Total 57 (instead of 12)

Note: There are more offices in each region, however, I selected only a
couple from each region. If I select all the offices the Grand Total is
correct.

Any advice would be greatly appreciated
Thanks,
Miroslav



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

Default Re: Incorrect Total - 07-18-2006 , 11:33 AM



Hi Jéjé,

Thanks for your prompt reply.
My cube should be a very simple one. I just have one fact table and three
dimensions linked to the fact table using the dimension keys. I created the
subscription count measure by selecting "New measure" and then selecting
Usage: Distinct count
Source Table: My Fact table
Source Column: I selected the dimension key
When I browse the cube using Development studion I am getting incorrect
result.
I do not know where to find MDX for the measure created. I captured MDX
executed during the browsing using profiler but it is a huge statement and
you probably do not want to see that.
How and where should I specify that I want to see visualtotal?
Thanks,
Miroslav

"Jéjé" wrote:

Quote:
do you have any other members?
can you send the MDX query?
the result appear to not be a visualtotal, its why the total is different.
(grand total = All Region * All Offices; visual total will evaluate only the
totals for the selected members)

also, do you use a many-many relationship? (AS2005 only)

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:EFC54E57-73C2-4FD0-8898-09786D542DCA (AT) microsoft (DOT) com...
I have a distinct count measure that shows proper subtotal but incorrect
Grand Total. For example:

Region Office SubscriptionCount
RegionA Office1 3
Office2 5
RegionA Total 7
RegionB Office1 2
Office2 3
RegionB Total 5
Grand Total 57 (instead of 12)

Note: There are more offices in each region, however, I selected only a
couple from each region. If I select all the offices the Grand Total is
correct.

Any advice would be greatly appreciated
Thanks,
Miroslav




Reply With Quote
  #4  
Old   
Jéjé
 
Posts: n/a

Default Re: Incorrect Total - 07-18-2006 , 03:15 PM



do you use AS2000 or 2005?
you talk about profiler, so I presume you use AS2005.

the visualtotal is an MDX function, you have to call it in your MDX syntax.
to see how to use it, use the profiler to intercept the query generated by
the pivottable.
just start the profiler before you do a move in the pivottable.
the pivottable use the visualtotal by default

you can find some infor on the help about the visualtotal function.

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote

Quote:
Hi Jéjé,

Thanks for your prompt reply.
My cube should be a very simple one. I just have one fact table and three
dimensions linked to the fact table using the dimension keys. I created
the
subscription count measure by selecting "New measure" and then selecting
Usage: Distinct count
Source Table: My Fact table
Source Column: I selected the dimension key
When I browse the cube using Development studion I am getting incorrect
result.
I do not know where to find MDX for the measure created. I captured MDX
executed during the browsing using profiler but it is a huge statement and
you probably do not want to see that.
How and where should I specify that I want to see visualtotal?
Thanks,
Miroslav

"Jéjé" wrote:

do you have any other members?
can you send the MDX query?
the result appear to not be a visualtotal, its why the total is
different.
(grand total = All Region * All Offices; visual total will evaluate only
the
totals for the selected members)

also, do you use a many-many relationship? (AS2005 only)

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:EFC54E57-73C2-4FD0-8898-09786D542DCA (AT) microsoft (DOT) com...
I have a distinct count measure that shows proper subtotal but incorrect
Grand Total. For example:

Region Office SubscriptionCount
RegionA Office1 3
Office2 5
RegionA Total 7
RegionB Office1 2
Office2 3
RegionB Total 5
Grand Total 57 (instead of 12)

Note: There are more offices in each region, however, I selected only a
couple from each region. If I select all the offices the Grand Total is
correct.

Any advice would be greatly appreciated
Thanks,
Miroslav






Reply With Quote
  #5  
Old   
Miroslav
 
Posts: n/a

Default Re: Incorrect Total - 07-19-2006 , 09:04 AM



I found the following link related to visual total:
http://doc.ddart.net/mssql/sql2000/h...tions_8l0z.htm
That article says:
"
Important: The VisualTotals function cannot be used in a query to a cube
that contains a distinct count measure; such a query will return an error for
all measure values.
"
It looks like I will have to find another way. I will do more research and
post any interesting finding.

Thanks,
Miroslav

"Jéjé" wrote:

Quote:
do you use AS2000 or 2005?
you talk about profiler, so I presume you use AS2005.

the visualtotal is an MDX function, you have to call it in your MDX syntax.
to see how to use it, use the profiler to intercept the query generated by
the pivottable.
just start the profiler before you do a move in the pivottable.
the pivottable use the visualtotal by default

you can find some infor on the help about the visualtotal function.

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:402CB663-A36B-42F6-97AB-E1BB251414AB (AT) microsoft (DOT) com...
Hi Jéjé,

Thanks for your prompt reply.
My cube should be a very simple one. I just have one fact table and three
dimensions linked to the fact table using the dimension keys. I created
the
subscription count measure by selecting "New measure" and then selecting
Usage: Distinct count
Source Table: My Fact table
Source Column: I selected the dimension key
When I browse the cube using Development studion I am getting incorrect
result.
I do not know where to find MDX for the measure created. I captured MDX
executed during the browsing using profiler but it is a huge statement and
you probably do not want to see that.
How and where should I specify that I want to see visualtotal?
Thanks,
Miroslav

"Jéjé" wrote:

do you have any other members?
can you send the MDX query?
the result appear to not be a visualtotal, its why the total is
different.
(grand total = All Region * All Offices; visual total will evaluate only
the
totals for the selected members)

also, do you use a many-many relationship? (AS2005 only)

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:EFC54E57-73C2-4FD0-8898-09786D542DCA (AT) microsoft (DOT) com...
I have a distinct count measure that shows proper subtotal but incorrect
Grand Total. For example:

Region Office SubscriptionCount
RegionA Office1 3
Office2 5
RegionA Total 7
RegionB Office1 2
Office2 3
RegionB Total 5
Grand Total 57 (instead of 12)

Note: There are more offices in each region, however, I selected only a
couple from each region. If I select all the offices the Grand Total is
correct.

Any advice would be greatly appreciated
Thanks,
Miroslav







Reply With Quote
  #6  
Old   
Jéjé
 
Posts: n/a

Default Re: Incorrect Total - 07-19-2006 , 11:48 AM



yes, for AS2000
you have to create a dynamic distinct count measure (or calculated DCount
measure)
this measure is slower but support the visual totals

something like:
count(crossjoin(<dimension>.<level>.members, {measures.[AnyCountOrSum
measure]}))

search on the web for more detail and information for these distinct count
measures. there is some articles.


"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote

Quote:
I found the following link related to visual total:
http://doc.ddart.net/mssql/sql2000/h...tions_8l0z.htm
That article says:
"
Important: The VisualTotals function cannot be used in a query to a cube
that contains a distinct count measure; such a query will return an error
for
all measure values.
"
It looks like I will have to find another way. I will do more research and
post any interesting finding.

Thanks,
Miroslav

"Jéjé" wrote:

do you use AS2000 or 2005?
you talk about profiler, so I presume you use AS2005.

the visualtotal is an MDX function, you have to call it in your MDX
syntax.
to see how to use it, use the profiler to intercept the query generated
by
the pivottable.
just start the profiler before you do a move in the pivottable.
the pivottable use the visualtotal by default

you can find some infor on the help about the visualtotal function.

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:402CB663-A36B-42F6-97AB-E1BB251414AB (AT) microsoft (DOT) com...
Hi Jéjé,

Thanks for your prompt reply.
My cube should be a very simple one. I just have one fact table and
three
dimensions linked to the fact table using the dimension keys. I
created
the
subscription count measure by selecting "New measure" and then
selecting
Usage: Distinct count
Source Table: My Fact table
Source Column: I selected the dimension key
When I browse the cube using Development studion I am getting incorrect
result.
I do not know where to find MDX for the measure created. I captured MDX
executed during the browsing using profiler but it is a huge statement
and
you probably do not want to see that.
How and where should I specify that I want to see visualtotal?
Thanks,
Miroslav

"Jéjé" wrote:

do you have any other members?
can you send the MDX query?
the result appear to not be a visualtotal, its why the total is
different.
(grand total = All Region * All Offices; visual total will evaluate
only
the
totals for the selected members)

also, do you use a many-many relationship? (AS2005 only)

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:EFC54E57-73C2-4FD0-8898-09786D542DCA (AT) microsoft (DOT) com...
I have a distinct count measure that shows proper subtotal but
incorrect
Grand Total. For example:

Region Office SubscriptionCount
RegionA Office1 3
Office2 5
RegionA Total 7
RegionB Office1 2
Office2 3
RegionB Total 5
Grand Total 57 (instead of 12)

Note: There are more offices in each region, however, I selected
only a
couple from each region. If I select all the offices the Grand Total
is
correct.

Any advice would be greatly appreciated
Thanks,
Miroslav









Reply With Quote
  #7  
Old   
SAM
 
Posts: n/a

Default Re: Incorrect Total - 08-14-2006 , 04:06 PM



can you use the Visual Totals function with a calculated member?

([Measures].[Total Sales Amount] - [Measures].[Total Sales Credited]) -
[Measures].[Discount Amount]

After removing the distinct count from the cubes, using the visualtotal
option worked for the Excel grand total; however, I found a couple of
discrepancies with a few of my calculated members in Excel but not sure why.

For instance, the calculated member mdx above is reporting $1,104,832.38 for
the sales rep under a particular sales mgr, but the correct amount should be
$1,074,261.33. So excel is reporting a extra $30K but unsure why. I thought
if I explicitly use the Visual Total function in the calculated member it
would resolve the problem.

Any help?

"Jéjé" wrote:

Quote:
yes, for AS2000
you have to create a dynamic distinct count measure (or calculated DCount
measure)
this measure is slower but support the visual totals

something like:
count(crossjoin(<dimension>.<level>.members, {measures.[AnyCountOrSum
measure]}))

search on the web for more detail and information for these distinct count
measures. there is some articles.


"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:B8BCA233-EF2D-4C80-8B5C-15C1C131B8CD (AT) microsoft (DOT) com...
I found the following link related to visual total:
http://doc.ddart.net/mssql/sql2000/h...tions_8l0z.htm
That article says:
"
Important: The VisualTotals function cannot be used in a query to a cube
that contains a distinct count measure; such a query will return an error
for
all measure values.
"
It looks like I will have to find another way. I will do more research and
post any interesting finding.

Thanks,
Miroslav

"Jéjé" wrote:

do you use AS2000 or 2005?
you talk about profiler, so I presume you use AS2005.

the visualtotal is an MDX function, you have to call it in your MDX
syntax.
to see how to use it, use the profiler to intercept the query generated
by
the pivottable.
just start the profiler before you do a move in the pivottable.
the pivottable use the visualtotal by default

you can find some infor on the help about the visualtotal function.

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:402CB663-A36B-42F6-97AB-E1BB251414AB (AT) microsoft (DOT) com...
Hi Jéjé,

Thanks for your prompt reply.
My cube should be a very simple one. I just have one fact table and
three
dimensions linked to the fact table using the dimension keys. I
created
the
subscription count measure by selecting "New measure" and then
selecting
Usage: Distinct count
Source Table: My Fact table
Source Column: I selected the dimension key
When I browse the cube using Development studion I am getting incorrect
result.
I do not know where to find MDX for the measure created. I captured MDX
executed during the browsing using profiler but it is a huge statement
and
you probably do not want to see that.
How and where should I specify that I want to see visualtotal?
Thanks,
Miroslav

"Jéjé" wrote:

do you have any other members?
can you send the MDX query?
the result appear to not be a visualtotal, its why the total is
different.
(grand total = All Region * All Offices; visual total will evaluate
only
the
totals for the selected members)

also, do you use a many-many relationship? (AS2005 only)

"Miroslav" <miroslav.brkic (AT) ca (DOT) fujitsu.com> wrote in message
news:EFC54E57-73C2-4FD0-8898-09786D542DCA (AT) microsoft (DOT) com...
I have a distinct count measure that shows proper subtotal but
incorrect
Grand Total. For example:

Region Office SubscriptionCount
RegionA Office1 3
Office2 5
RegionA Total 7
RegionB Office1 2
Office2 3
RegionB Total 5
Grand Total 57 (instead of 12)

Note: There are more offices in each region, however, I selected
only a
couple from each region. If I select all the offices the Grand Total
is
correct.

Any advice would be greatly appreciated
Thanks,
Miroslav










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.