dbTalk Databases Forums  

To display measures between two dates

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


Discuss To display measures between two dates in the microsoft.public.sqlserver.olap forum.



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

Default To display measures between two dates - 12-03-2004 , 01:25 AM






How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.

Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Re: To display measures between two dates - 12-03-2004 , 02:21 PM






what are you trying to do; can you give more examples?


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote

Quote:
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.



Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: To display measures between two dates - 12-04-2004 , 09:12 AM



I'm looking for something similar...

In As you normally don't choose from-date - you choose date as part of a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get Year to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...

http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4
http://groups.google.com/groups?hl=e...72%40TK2MSF T
NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se flexible but
then you wouldn't need to code so much in As and you won't get drillthrough
trouble with calculated members) .... you could in your time dimension table
put in logic that marks current day,
current month, current quarter and so on with a parameter or "last thirten
weeks".

That would of course mean that this flagged needed to be set as part of your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my problem to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote

Quote:
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.



Reply With Quote
  #4  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: To display measures between two dates - 12-04-2004 , 01:18 PM



Here was an intesting input...

Twin timestamps....

Haven't read it all yet....

http://www.intelligententerprise.com...tml?_requestid
=311780

It was a link from this site

www.ralphkimball.com

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
I'm looking for something similar...

In As you normally don't choose from-date - you choose date as part of a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get Year to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...


http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4

http://groups.google.com/groups?hl=e...72%40TK2MSF T

NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se flexible but
then you wouldn't need to code so much in As and you won't get
drillthrough
trouble with calculated members) .... you could in your time dimension
table
put in logic that marks current day,
current month, current quarter and so on with a parameter or "last thirten
weeks".

That would of course mean that this flagged needed to be set as part of
your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my problem to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote in message
news:814276fc.0412022325.50d09676 (AT) posting (DOT) google.com...
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.





Reply With Quote
  #5  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: To display measures between two dates - 12-04-2004 , 01:24 PM



....sorry but I don't see how it can be used in AS.

My interpreation of the article is that you would choose one thing in one
dimension and another thing in the other dimension. Then I won't get
a tupple - will I ?

Anyone ?

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
Here was an intesting input...

Twin timestamps....

Haven't read it all yet....


http://www.intelligententerprise.com...tml?_requestid
=311780

It was a link from this site

www.ralphkimball.com

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:OV3gzOh2EHA.3408 (AT) tk2msftngp13 (DOT) phx.gbl...
I'm looking for something similar...

In As you normally don't choose from-date - you choose date as part of a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get Year to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...



http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4


http://groups.google.com/groups?hl=e...72%40TK2MSF T


NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se flexible but
then you wouldn't need to code so much in As and you won't get
drillthrough
trouble with calculated members) .... you could in your time dimension
table
put in logic that marks current day,
current month, current quarter and so on with a parameter or "last
thirten
weeks".

That would of course mean that this flagged needed to be set as part of
your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my problem
to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote in message
news:814276fc.0412022325.50d09676 (AT) posting (DOT) google.com...
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.







Reply With Quote
  #6  
Old   
Martin Mason
 
Posts: n/a

Default Re: To display measures between two dates - 12-05-2004 , 08:19 AM



I think it can be done very easily if I understand the question. Create a
calculated member in the time dimension to represent your time span. For
instance,

WITH MEMBER [Time].[TimeSpan] AS
'Aggregate([Time].[Day].[20040302]:[Time].[Day].[20041003])'

Then use the calculated member in the WHERE clause

SELECT .... ON COLUMNS,
.... ON ROWS
FROM [Sales]
WHERE ([Time].[TimeSpan], [Measures].[Unit Sales])

The results would give you the totals for the time span specified. Is this
what you were looking for? It will give you the same results as a BETWEEN
clause in SQL.

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
...sorry but I don't see how it can be used in AS.

My interpreation of the article is that you would choose one thing in one
dimension and another thing in the other dimension. Then I won't get
a tupple - will I ?

Anyone ?

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:uSPqEYj2EHA.2592 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Here was an intesting input...

Twin timestamps....

Haven't read it all yet....


http://www.intelligententerprise.com...tml?_requestid
=311780

It was a link from this site

www.ralphkimball.com

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:OV3gzOh2EHA.3408 (AT) tk2msftngp13 (DOT) phx.gbl...
I'm looking for something similar...

In As you normally don't choose from-date - you choose date as part of
a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get Year
to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...



http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4


http://groups.google.com/groups?hl=e...72%40TK2MSF T


NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se flexible
but
then you wouldn't need to code so much in As and you won't get
drillthrough
trouble with calculated members) .... you could in your time dimension
table
put in logic that marks current day,
current month, current quarter and so on with a parameter or "last
thirten
weeks".

That would of course mean that this flagged needed to be set as part of
your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my problem
to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote in message
news:814276fc.0412022325.50d09676 (AT) posting (DOT) google.com...
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.









Reply With Quote
  #7  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: To display measures between two dates - 12-05-2004 , 12:28 PM



Sounds interesting - raises some trouble however

a) I cannot influence the MDX-statement from the front-end so I would have
to make you member on the server - and then
it won't be a dynamic member - it needs to be one presented to the end-user.

b) By aggregating I cannot make drill-through in the same report ? But I
could make drill through by calling an action to
a report that does drill directly to the fact table instead

So a is the worst obstacle....

Another way to go was to change the front-end to work as you describe ....
in one front-end it could be an option but not in
the other one...

"Martin Mason" <martinma (AT) mail (DOT) wt.net> wrote

Quote:
I think it can be done very easily if I understand the question. Create a
calculated member in the time dimension to represent your time span. For
instance,

WITH MEMBER [Time].[TimeSpan] AS
'Aggregate([Time].[Day].[20040302]:[Time].[Day].[20041003])'

Then use the calculated member in the WHERE clause

SELECT .... ON COLUMNS,
.... ON ROWS
FROM [Sales]
WHERE ([Time].[TimeSpan], [Measures].[Unit Sales])

The results would give you the totals for the time span specified. Is
this
what you were looking for? It will give you the same results as a BETWEEN
clause in SQL.

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:%23aqfpbj2EHA.1188 (AT) tk2msftngp13 (DOT) phx.gbl...
...sorry but I don't see how it can be used in AS.

My interpreation of the article is that you would choose one thing in
one
dimension and another thing in the other dimension. Then I won't get
a tupple - will I ?

Anyone ?

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:uSPqEYj2EHA.2592 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Here was an intesting input...

Twin timestamps....

Haven't read it all yet....



http://www.intelligententerprise.com...tml?_requestid
=311780

It was a link from this site

www.ralphkimball.com

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:OV3gzOh2EHA.3408 (AT) tk2msftngp13 (DOT) phx.gbl...
I'm looking for something similar...

In As you normally don't choose from-date - you choose date as part
of
a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get Year
to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...




http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4



http://groups.google.com/groups?hl=e...72%40TK2MSF T



NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se flexible
but
then you wouldn't need to code so much in As and you won't get
drillthrough
trouble with calculated members) .... you could in your time
dimension
table
put in logic that marks current day,
current month, current quarter and so on with a parameter or "last
thirten
weeks".

That would of course mean that this flagged needed to be set as part
of
your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my
problem
to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote in message
news:814276fc.0412022325.50d09676 (AT) posting (DOT) google.com...
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.











Reply With Quote
  #8  
Old   
Chris Webb
 
Posts: n/a

Default Re: To display measures between two dates - 12-06-2004 , 07:25 AM



The standard way I solve this particular problem is described here
http://groups.google.co.uk/groups?hl...40TK2MSFTNGP12
On a related issue, if query performance is a problem when running queries
which sum up multiple time periods you might be interested to read the
following post (and its immediate successor in the thread) too
http://groups.google.co.uk/groups?hl...0microsoft.com

It doesn't get round the drillthrough issue though - you'd need to do the
action workaround instead.

HTH,

Chris

"Michael Vardinghus" wrote:

Quote:
Sounds interesting - raises some trouble however

a) I cannot influence the MDX-statement from the front-end so I would have
to make you member on the server - and then
it won't be a dynamic member - it needs to be one presented to the end-user.

b) By aggregating I cannot make drill-through in the same report ? But I
could make drill through by calling an action to
a report that does drill directly to the fact table instead

So a is the worst obstacle....

Another way to go was to change the front-end to work as you describe ....
in one front-end it could be an option but not in
the other one...

"Martin Mason" <martinma (AT) mail (DOT) wt.net> wrote in message
news:uETeBVt2EHA.1076 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I think it can be done very easily if I understand the question. Create a
calculated member in the time dimension to represent your time span. For
instance,

WITH MEMBER [Time].[TimeSpan] AS
'Aggregate([Time].[Day].[20040302]:[Time].[Day].[20041003])'

Then use the calculated member in the WHERE clause

SELECT .... ON COLUMNS,
.... ON ROWS
FROM [Sales]
WHERE ([Time].[TimeSpan], [Measures].[Unit Sales])

The results would give you the totals for the time span specified. Is
this
what you were looking for? It will give you the same results as a BETWEEN
clause in SQL.

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:%23aqfpbj2EHA.1188 (AT) tk2msftngp13 (DOT) phx.gbl...
...sorry but I don't see how it can be used in AS.

My interpreation of the article is that you would choose one thing in
one
dimension and another thing in the other dimension. Then I won't get
a tupple - will I ?

Anyone ?

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:uSPqEYj2EHA.2592 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Here was an intesting input...

Twin timestamps....

Haven't read it all yet....



http://www.intelligententerprise.com...tml?_requestid
=311780

It was a link from this site

www.ralphkimball.com

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:OV3gzOh2EHA.3408 (AT) tk2msftngp13 (DOT) phx.gbl...
I'm looking for something similar...

In As you normally don't choose from-date - you choose date as part
of
a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get Year
to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...




http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4



http://groups.google.com/groups?hl=e...72%40TK2MSF T



NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se flexible
but
then you wouldn't need to code so much in As and you won't get
drillthrough
trouble with calculated members) .... you could in your time
dimension
table
put in logic that marks current day,
current month, current quarter and so on with a parameter or "last
thirten
weeks".

That would of course mean that this flagged needed to be set as part
of
your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my
problem
to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote in message
news:814276fc.0412022325.50d09676 (AT) posting (DOT) google.com...
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.












Reply With Quote
  #9  
Old   
Chris Webb
 
Posts: n/a

Default Re: To display measures between two dates - 12-06-2004 , 07:25 AM



(Don't know if this is a double posting - I got an error at my last attempt
to post an answer, so I'm trying again)

The standard way I solve this problem is described here
http://groups.google.co.uk/groups?hl...40TK2MSFTNGP12

On a related note, if you have performance problems in your queries when
you're summing up multiple time periods, you might be interested to read this
post and its immediate successor in the thread
http://groups.google.co.uk/groups?hl...0microsoft.com

Of course, this approach doesn't get round the drillthrough problem - as you
said, you'd need to create an action to do it instead.

HTH,

Chris
"Michael Vardinghus" wrote:

Quote:
Sounds interesting - raises some trouble however

a) I cannot influence the MDX-statement from the front-end so I would have
to make you member on the server - and then
it won't be a dynamic member - it needs to be one presented to the end-user.

b) By aggregating I cannot make drill-through in the same report ? But I
could make drill through by calling an action to
a report that does drill directly to the fact table instead

So a is the worst obstacle....

Another way to go was to change the front-end to work as you describe ....
in one front-end it could be an option but not in
the other one...

"Martin Mason" <martinma (AT) mail (DOT) wt.net> wrote in message
news:uETeBVt2EHA.1076 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I think it can be done very easily if I understand the question. Create a
calculated member in the time dimension to represent your time span. For
instance,

WITH MEMBER [Time].[TimeSpan] AS
'Aggregate([Time].[Day].[20040302]:[Time].[Day].[20041003])'

Then use the calculated member in the WHERE clause

SELECT .... ON COLUMNS,
.... ON ROWS
FROM [Sales]
WHERE ([Time].[TimeSpan], [Measures].[Unit Sales])

The results would give you the totals for the time span specified. Is
this
what you were looking for? It will give you the same results as a BETWEEN
clause in SQL.

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:%23aqfpbj2EHA.1188 (AT) tk2msftngp13 (DOT) phx.gbl...
...sorry but I don't see how it can be used in AS.

My interpreation of the article is that you would choose one thing in
one
dimension and another thing in the other dimension. Then I won't get
a tupple - will I ?

Anyone ?

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:uSPqEYj2EHA.2592 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Here was an intesting input...

Twin timestamps....

Haven't read it all yet....



http://www.intelligententerprise.com...tml?_requestid
=311780

It was a link from this site

www.ralphkimball.com

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:OV3gzOh2EHA.3408 (AT) tk2msftngp13 (DOT) phx.gbl...
I'm looking for something similar...

In As you normally don't choose from-date - you choose date as part
of
a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get Year
to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...




http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4



http://groups.google.com/groups?hl=e...72%40TK2MSF T



NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se flexible
but
then you wouldn't need to code so much in As and you won't get
drillthrough
trouble with calculated members) .... you could in your time
dimension
table
put in logic that marks current day,
current month, current quarter and so on with a parameter or "last
thirten
weeks".

That would of course mean that this flagged needed to be set as part
of
your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my
problem
to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote in message
news:814276fc.0412022325.50d09676 (AT) posting (DOT) google.com...
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march 2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in SQL.












Reply With Quote
  #10  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: To display measures between two dates - 12-07-2004 , 01:47 PM



Wouv....that was solved by using a special approach.....doing something
outside of
AS to AS - wouldn't have thought of that...that's for sure


"Chris Webb" <OnlyForPostingToNewsgroups (AT) hotmail (DOT) com> wrote

Quote:
The standard way I solve this particular problem is described here:

http://groups.google.co.uk/groups?hl...3V1FezCHA.1644
%40TK2MSFTNGP12
Quote:
On a related issue, if query performance is a problem when running queries
which sum up multiple time periods you might be interested to read the
following post (and its immediate successor in the thread) too:

http://groups.google.co.uk/groups?hl...-461A-9000-16A
A485B281B%40microsoft.com
Quote:
It doesn't get round the drillthrough issue though - you'd need to do the
action workaround instead.

HTH,

Chris

"Michael Vardinghus" wrote:

Sounds interesting - raises some trouble however

a) I cannot influence the MDX-statement from the front-end so I would
have
to make you member on the server - and then
it won't be a dynamic member - it needs to be one presented to the
end-user.

b) By aggregating I cannot make drill-through in the same report ? But I
could make drill through by calling an action to
a report that does drill directly to the fact table instead

So a is the worst obstacle....

Another way to go was to change the front-end to work as you describe
.....
in one front-end it could be an option but not in
the other one...

"Martin Mason" <martinma (AT) mail (DOT) wt.net> wrote in message
news:uETeBVt2EHA.1076 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I think it can be done very easily if I understand the question.
Create a
calculated member in the time dimension to represent your time span.
For
instance,

WITH MEMBER [Time].[TimeSpan] AS
'Aggregate([Time].[Day].[20040302]:[Time].[Day].[20041003])'

Then use the calculated member in the WHERE clause

SELECT .... ON COLUMNS,
.... ON ROWS
FROM [Sales]
WHERE ([Time].[TimeSpan], [Measures].[Unit Sales])

The results would give you the totals for the time span specified. Is
this
what you were looking for? It will give you the same results as a
BETWEEN
clause in SQL.

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:%23aqfpbj2EHA.1188 (AT) tk2msftngp13 (DOT) phx.gbl...
...sorry but I don't see how it can be used in AS.

My interpreation of the article is that you would choose one thing
in
one
dimension and another thing in the other dimension. Then I won't get
a tupple - will I ?

Anyone ?

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in
message
news:uSPqEYj2EHA.2592 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Here was an intesting input...

Twin timestamps....

Haven't read it all yet....




http://www.intelligententerprise.com...tml?_requestid
=311780

It was a link from this site

www.ralphkimball.com

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in
message
news:OV3gzOh2EHA.3408 (AT) tk2msftngp13 (DOT) phx.gbl...
I'm looking for something similar...

In As you normally don't choose from-date - you choose date as
part
of
a
tupple (think it's called) and you'll see the results
in the cube corresponding to what you've chosen.

However you can use MDX date functions such as ytd where you get
Year
to
date but that doesn't sound like your need.

Here's some threads that I'll be looking at to see if it helps...





http://groups.google.com/groups?q=ol...elm=e2JJFl7 3
DHA.1096%40TK2MSFTNGP11.phx.gbl&rnum=4




http://groups.google.com/groups?hl=e...72%40TK2MSF T




NGP09&rnum=11&prev=/groups%3Fq%3Dolap%2Bdate%2Binterval%26start%3D10%2 6hl%3D
en%26lr%3D%26selm%3DuPKpmzczCHA.1672%2540TK2MSFTNG P09%26rnum%3D11

Another way to go would be to lock it a little more (not se
flexible
but
then you wouldn't need to code so much in As and you won't get
drillthrough
trouble with calculated members) .... you could in your time
dimension
table
put in logic that marks current day,
current month, current quarter and so on with a parameter or
"last
thirten
weeks".

That would of course mean that this flagged needed to be set as
part
of
your
ETL process but that shouldn't be too hard.....

I would check out if this could solve the problem if it was my
problem
to
solve...


"Amit Asawa" <amit.asawa (AT) capgemini (DOT) com> wrote in message
news:814276fc.0412022325.50d09676 (AT) posting (DOT) google.com...
How to write a query to filter data between two dates.i.e


Suppose i want to find the sales of a person from 2nd march
2004 to
3rd october 2004.

i.e in short what can i write in mdx in place of 'between' in
SQL.














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.