|
Home > Archive > MS SQL Server OLAP > January 2006 > FROM date TO date
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Alex Deiden 2006-01-27, 8:24 pm |
| How to create calculated member when all date members like
'2005-12-03T00:00:00' to slice by 'FROM DATE TO DATE' period.
That is the 'PROTOTYPE' OF MDX that I need to have:
with member [date].[hrchy2].& #91;kpifromDateToDat
e] as
'{[measures].[total checks],([date].[hrchy2].[date
name].[2004-04-03T00:00:00]:
[date].[date name].[2004-04-08T00:00:00])}'
select [date].[calendar date].& #91;kpifromDateToDat
e]
on 0,
([organization].[hrchy1].customer)
on 1,
from [cube]
where organization.customer.delta
| |
|
| The definition you had in your calculated member returned a set, to get
it to return a value you would need to use the AGGREGATE or SUM function
over the set of dates.
eg.
with member [date].[hrchy2].& #91;kpifromDateToDat
e] as
'SUM([date].[hrchy2].[date name].[2004-04-03T00:00:00]:
[date].[date name].[2004-04-08T00:00:00],[measures].[total checks])'
select [date].[calendar date].& #91;kpifromDateToDat
e]
on 0,
([organization].[hrchy1].customer)
on 1,
from [cube]
where organization.customer.delta
--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
In article <940722ED-5DC7-4229-8C41- EE4E8DA0774F@microso
ft.com>,
AlexDeiden@discussio
ns.microsoft.com says...
> How to create calculated member when all date members like
> '2005-12-03T00:00:00' to slice by 'FROM DATE TO DATE' period.
>
> That is the 'PROTOTYPE' OF MDX that I need to have:
>
>
> with member [date].[hrchy2].& #91;kpifromDateToDat
e] as
> '{[measures].[total checks],([date].[hrchy2].[date
> name].[2004-04-03T00:00:00]:
> [date].[date name].[2004-04-08T00:00:00])}'
>
> select [date].[calendar date].& #91;kpifromDateToDat
e]
> on 0,
> ([organization].[hrchy1].customer)
> on 1,
> from [cube]
> where organization.customer.delta
>
>
>
>
| |
| Alex Deiden 2006-01-29, 3:23 am |
| yops...Friday...Thank you Man!
Alex
"Darren Gosbell" wrote:
> The definition you had in your calculated member returned a set, to get
> it to return a value you would need to use the AGGREGATE or SUM function
> over the set of dates.
>
> eg.
>
> with member [date].[hrchy2].& #91;kpifromDateToDat
e] as
> 'SUM([date].[hrchy2].[date name].[2004-04-03T00:00:00]:
> [date].[date name].[2004-04-08T00:00:00],[measures].[total checks])'
>
> select [date].[calendar date].& #91;kpifromDateToDat
e]
> on 0,
> ([organization].[hrchy1].customer)
> on 1,
> from [cube]
> where organization.customer.delta
>
> --
> Regards
> Darren Gosbell [MCSD]
> Blog: http://www.geekswithblogs.net/darrengosbell
>
> In article <940722ED-5DC7-4229-8C41- EE4E8DA0774F@microso
ft.com>,
> AlexDeiden@discussio
ns.microsoft.com says...
>
|
|
|
|
|