dbTalk Databases Forums  

Balance Sheet MDX

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


Discuss Balance Sheet MDX in the microsoft.public.sqlserver.olap forum.



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

Default Balance Sheet MDX - 12-21-2004 , 07:25 AM






Hi,

maybe this question was asked before... but I didn't find the solution...

I know about ytd(). This gives you i.e. an amount summed up over the year.
What I need is a somehting like a td(), so the sum of everything till today
(better: the current date). The problem is to set up a Balance Sheet on a
fact table which doesn't give you balance i.e. per month but each posting.
So the current balance is the sum of all postings since the start of the
business...

What can I do?

Thanks,


Thomas



Reply With Quote
  #2  
Old   
Andrej Hudoklin
 
Posts: n/a

Default Re: Balance Sheet MDX - 12-21-2004 , 08:15 AM







Well this is then a range of the first date till selected one.

you can specify in MDX range. Lets say that time dimension starts with
1.1.2000 and you want to see the sum of all dates till selected one - but in
this case the selected one must be in level Days -> you have to make rules
for levels.

{[Time].&[2000].&[12].&[21]:[Time].currentmember}


HTH,
Andrej


"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> wrote

Quote:
Hi,

maybe this question was asked before... but I didn't find the solution...

I know about ytd(). This gives you i.e. an amount summed up over the year.
What I need is a somehting like a td(), so the sum of everything till
today (better: the current date). The problem is to set up a Balance Sheet
on a fact table which doesn't give you balance i.e. per month but each
posting. So the current balance is the sum of all postings since the start
of the business...

What can I do?

Thanks,


Thomas




Reply With Quote
  #3  
Old   
Thomas Pagel
 
Posts: n/a

Default Re: Balance Sheet MDX - 12-22-2004 , 03:11 AM



Andrej,

thanks, this works perfectly... But only, if you have a posting on the
currentdate... If that member is empty, it returns NULL... Any idea for
that?

Thanks again



Thomas

"Andrej Hudoklin" <andrej.hudoklin (AT) add (DOT) si> schrieb im Newsbeitrag
news:O75PSe25EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Quote:
Well this is then a range of the first date till selected one.

you can specify in MDX range. Lets say that time dimension starts with
1.1.2000 and you want to see the sum of all dates till selected one - but
in this case the selected one must be in level Days -> you have to make
rules for levels.

{[Time].&[2000].&[12].&[21]:[Time].currentmember}


HTH,
Andrej


"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> wrote in
message news:uhDkWC25EHA.4028 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Hi,

maybe this question was asked before... but I didn't find the solution...

I know about ytd(). This gives you i.e. an amount summed up over the
year. What I need is a somehting like a td(), so the sum of everything
till today (better: the current date). The problem is to set up a Balance
Sheet on a fact table which doesn't give you balance i.e. per month but
each posting. So the current balance is the sum of all postings since the
start of the business...

What can I do?

Thanks,


Thomas






Reply With Quote
  #4  
Old   
Thomas Pagel
 
Posts: n/a

Default Re: Balance Sheet MDX - 12-22-2004 , 09:39 AM



Hi,

I found a solution on myself... It's quite slow but it works...

sum({head(
FILTER({[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER}, NOT ISEMPTY([Measures].[Amount]))).ITEM(0):
TAIL(
FILTER({[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER}, NOT ISEMPTY([Measures].[Amount]))).ITEM(0)}
,[Measures].[Amount])


Thomas
"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> schrieb im
Newsbeitrag news:%23r8TxYA6EHA.824 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Quote:
Andrej,

thanks, this works perfectly... But only, if you have a posting on the
currentdate... If that member is empty, it returns NULL... Any idea for
that?

Thanks again



Thomas

"Andrej Hudoklin" <andrej.hudoklin (AT) add (DOT) si> schrieb im Newsbeitrag
news:O75PSe25EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl...

Well this is then a range of the first date till selected one.

you can specify in MDX range. Lets say that time dimension starts with
1.1.2000 and you want to see the sum of all dates till selected one - but
in this case the selected one must be in level Days -> you have to make
rules for levels.

{[Time].&[2000].&[12].&[21]:[Time].currentmember}


HTH,
Andrej


"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> wrote in
message news:uhDkWC25EHA.4028 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Hi,

maybe this question was asked before... but I didn't find the
solution...

I know about ytd(). This gives you i.e. an amount summed up over the
year. What I need is a somehting like a td(), so the sum of everything
till today (better: the current date). The problem is to set up a
Balance Sheet on a fact table which doesn't give you balance i.e. per
month but each posting. So the current balance is the sum of all
postings since the start of the business...

What can I do?

Thanks,


Thomas








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

Default Re: Balance Sheet MDX - 12-24-2004 , 04:45 AM



Is there any reason you use head and tail? I think following expression give
you the same results.

SUM(
FILTER(
{[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER},
NOT ISEMPTY([Measures].[Amount])
),
[Measures].[Amount]
)


Ohjoo Kwon
www.olapforum.com



"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> wrote

Quote:
Hi,

I found a solution on myself... It's quite slow but it works...

sum({head(
FILTER({[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER}, NOT ISEMPTY([Measures].[Amount]))).ITEM(0):
TAIL(
FILTER({[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER}, NOT ISEMPTY([Measures].[Amount]))).ITEM(0)}
,[Measures].[Amount])


Thomas
"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> schrieb im
Newsbeitrag news:%23r8TxYA6EHA.824 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Andrej,

thanks, this works perfectly... But only, if you have a posting on the
currentdate... If that member is empty, it returns NULL... Any idea for
that?

Thanks again



Thomas

"Andrej Hudoklin" <andrej.hudoklin (AT) add (DOT) si> schrieb im Newsbeitrag
news:O75PSe25EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl...

Well this is then a range of the first date till selected one.

you can specify in MDX range. Lets say that time dimension starts with
1.1.2000 and you want to see the sum of all dates till selected one -
but
in this case the selected one must be in level Days -> you have to make
rules for levels.

{[Time].&[2000].&[12].&[21]:[Time].currentmember}


HTH,
Andrej


"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> wrote in
message news:uhDkWC25EHA.4028 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Hi,

maybe this question was asked before... but I didn't find the
solution...

I know about ytd(). This gives you i.e. an amount summed up over the
year. What I need is a somehting like a td(), so the sum of everything
till today (better: the current date). The problem is to set up a
Balance Sheet on a fact table which doesn't give you balance i.e. per
month but each posting. So the current balance is the sum of all
postings since the start of the business...

What can I do?

Thanks,


Thomas










Reply With Quote
  #6  
Old   
Thomas Pagel
 
Posts: n/a

Default Re: Balance Sheet MDX - 12-28-2004 , 12:02 PM



Hi,

sounds good... I'll give it a try when I'm working on that project again...
Requirements changed so it's not so urgent anymore... But thanks for the
feedback!


Thomas


"Ohjoo Kwon" <ojkwon (AT) olap (DOT) co.kr> schrieb im Newsbeitrag
news:%23G3kaRa6EHA.2180 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Quote:
Is there any reason you use head and tail? I think following expression
give
you the same results.

SUM(
FILTER(
{[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER},
NOT ISEMPTY([Measures].[Amount])
),
[Measures].[Amount]
)


Ohjoo Kwon
www.olapforum.com



"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> wrote in
message
news:ek$m0xD6EHA.208 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Hi,

I found a solution on myself... It's quite slow but it works...

sum({head(
FILTER({[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER}, NOT ISEMPTY([Measures].[Amount]))).ITEM(0):
TAIL(
FILTER({[Date].[Year].&[2003].&[2].&[4].&[20030401] :
[Date].CURRENTMEMBER}, NOT ISEMPTY([Measures].[Amount]))).ITEM(0)}
,[Measures].[Amount])


Thomas
"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> schrieb im
Newsbeitrag news:%23r8TxYA6EHA.824 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Andrej,

thanks, this works perfectly... But only, if you have a posting on the
currentdate... If that member is empty, it returns NULL... Any idea for
that?

Thanks again



Thomas

"Andrej Hudoklin" <andrej.hudoklin (AT) add (DOT) si> schrieb im Newsbeitrag
news:O75PSe25EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl...

Well this is then a range of the first date till selected one.

you can specify in MDX range. Lets say that time dimension starts
with
1.1.2000 and you want to see the sum of all dates till selected one -
but
in this case the selected one must be in level Days -> you have to
make
rules for levels.

{[Time].&[2000].&[12].&[21]:[Time].currentmember}


HTH,
Andrej


"Thomas Pagel" <tpagel (AT) _nospam_ (DOT) software4you.com._nospam_> wrote in
message news:uhDkWC25EHA.4028 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Hi,

maybe this question was asked before... but I didn't find the
solution...

I know about ytd(). This gives you i.e. an amount summed up over the
year. What I need is a somehting like a td(), so the sum of
everything
till today (better: the current date). The problem is to set up a
Balance Sheet on a fact table which doesn't give you balance i.e. per
month but each posting. So the current balance is the sum of all
postings since the start of the business...

What can I do?

Thanks,


Thomas












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.