dbTalk Databases Forums  

adding the values in the cells column and row wise

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


Discuss adding the values in the cells column and row wise in the microsoft.public.sqlserver.olap forum.



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

Default adding the values in the cells column and row wise - 09-03-2003 , 01:45 AM






Hi

I want to add the values of the cells column wise and row wise and
willing to show the result at the bottom of every column and the
rightmost side of every row of the cube via mdx query.

Is it possible in any way.

Regards

Harris

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

Default Re: adding the values in the cells column and row wise - 09-05-2003 , 07:18 AM






Hi

Yes this tool is basically connected with Microsoft Xml For Analysis
SDK and allows me to send any type of mdx quesries.And yes i can send
MDX Select statements

Regards,

Harris Moin


"Tom Chester" <publicNOSPAM (AT) tomchester (DOT) net> wrote

Quote:
I'm not familiar with this front-end. Does it let you do MDX SELECT
statements?

tom @ the domain below
www.tomchester.net


"Harris" <harris (AT) techlogix (DOT) com> wrote in message
news:5e7e8113.0309032015.532a5c61 (AT) posting (DOT) google.com...
Dear Tom

I am using Sql Server for Analysis for developing the cube and am
showing the result in a tool called SnowFlake on aspnet pages in my
web application.

I think this answers your question and waiting for help .....

Regards,

Harris Moin

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

Default Re: adding the values in the cells column and row wise - 09-08-2003 , 07:21 AM



Hey Tom

You said my problem can be solved with select statements.
Am waiting for your reply impatiently.

Regards,

Harris

Reply With Quote
  #4  
Old   
Tom Chester
 
Posts: n/a

Default Re: adding the values in the cells column and row wise - 09-08-2003 , 11:14 AM



Here's an example using foodmart:

WITH
SET Set1 AS '[Product Family].Members'
SET Set2 AS 'Store.USA.Children'
MEMBER Product.Total AS
' SUM(Set1, [Store Sales]) '
MEMBER Store.Total AS
' Sum(Set2, [Store Sales]) '
SELECT
{ Set1, Product.Total} ON axis(0),
{ Set2, Store.Total} ON axis(1)
FROM Sales

tom @ the domain below
www.tomchester.net


"Harris" <harris (AT) techlogix (DOT) com> wrote

Quote:
Hey Tom

You said my problem can be solved with select statements.
Am waiting for your reply impatiently.

Regards,

Harris



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

Default Re: adding the values in the cells column and row wise - 09-09-2003 , 08:05 AM



Hi Tom

Thanx for your response. It realy does the trick but the thing is what
i was looking for is something more dynamic. Like just calculate the
values in the cells of the grid and give the total in the end.
Irrespective of what are the dimensions or the measures.

Something like i write a select statement and in the end write some
code to calculate the values in the columns and return there totals.

Thanx,

Harris



"Tom Chester" <publicNOSPAM (AT) tomchester (DOT) net> wrote

Quote:
Here's an example using foodmart:

WITH
SET Set1 AS '[Product Family].Members'
SET Set2 AS 'Store.USA.Children'
MEMBER Product.Total AS
' SUM(Set1, [Store Sales]) '
MEMBER Store.Total AS
' Sum(Set2, [Store Sales]) '
SELECT
{ Set1, Product.Total} ON axis(0),
{ Set2, Store.Total} ON axis(1)
FROM Sales

tom @ the domain below
www.tomchester.net


"Harris" <harris (AT) techlogix (DOT) com> wrote in message
news:5e7e8113.0309080421.4961dfad (AT) posting (DOT) google.com...
Hey Tom

You said my problem can be solved with select statements.
Am waiting for your reply impatiently.

Regards,

Harris

Reply With Quote
  #6  
Old   
Tom Chester
 
Posts: n/a

Default Re: adding the values in the cells column and row wise - 09-09-2003 , 09:00 AM



It's semi-doable using the axis() function. The problems are: 1) the dim
that a calc belongs to can't be dynamic (except programmatically); 2) it
gets dicey when >1dim is on the axis. I don't have time today to flesh this
out for you.

tom @ the domain below
www.tomchester.net


"Harris" <harris (AT) techlogix (DOT) com> wrote

Quote:
Hi Tom

Thanx for your response. It realy does the trick but the thing is what
i was looking for is something more dynamic. Like just calculate the
values in the cells of the grid and give the total in the end.
Irrespective of what are the dimensions or the measures.

Something like i write a select statement and in the end write some
code to calculate the values in the columns and return there totals.

Thanx,

Harris



"Tom Chester" <publicNOSPAM (AT) tomchester (DOT) net> wrote

Here's an example using foodmart:

WITH
SET Set1 AS '[Product Family].Members'
SET Set2 AS 'Store.USA.Children'
MEMBER Product.Total AS
' SUM(Set1, [Store Sales]) '
MEMBER Store.Total AS
' Sum(Set2, [Store Sales]) '
SELECT
{ Set1, Product.Total} ON axis(0),
{ Set2, Store.Total} ON axis(1)
FROM Sales

tom @ the domain below
www.tomchester.net


"Harris" <harris (AT) techlogix (DOT) com> wrote in message
news:5e7e8113.0309080421.4961dfad (AT) posting (DOT) google.com...
Hey Tom

You said my problem can be solved with select statements.
Am waiting for your reply impatiently.

Regards,

Harris



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

Default Re: adding the values in the cells column and row wise - 09-10-2003 , 12:33 AM



Hi

I have been able to find it's partial solution from one of these
forums. It works fine with adding the totals of the columns but since
i need to find the solution for both rows and columns. Am trying to
convert this query for that.But am facing with some errors. If you can
help me do that it will be great. The query is for foodmart 2000 as
follows:


with
member store.[] as 'null'
member Gender.Total As
'sum(Head(Axis(1),Axis(1).Count-1))',
solve_order=1
select
{[Measures].[Unit Sales]} on columns,
{CrossJoin({Gender.M,Gender.F},{USA.Children}),{(G ender.Total,Store.[])}}
on rows
from Sales

Regards,

Harris

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.