I have a MDX query, which getting measure from period and show it as a next date level:
WITH
MEMBER [Creation Date].[2017].[2017/01].[2017/01].[2017/01/11] AS
Aggregate
(
Filter
(
[Creation Date].[Minute].MEMBERS
,
[Creation Date].[Minute].CurrentMember.Name >= '2017/01/11 07:45'
AND
[Creation Date].[Minute].CurrentMember.Name <= '2017/01/11 23:59'
)
)
SELECT
{[Measures].[Sales Count]} ON COLUMNS
,{[Creation Date].[2017].[2017/01].[2017/01].[2017/01/11]} ON ROWS
FROM [Sales Star Schema];
and it returns exception: The '[Creation Date].[2017]' calculated member cannot be used as a parent of another calculated member.
2017 year does not contain any measure values in aggregate tables, but if I try query like this:
WITH
MEMBER [Creation Date].[2016].[2016/01].[2016/01].[2016/01/11] AS
Aggregate
(
Filter
(
[Creation Date].[Minute].MEMBERS
,
[Creation Date].[Minute].CurrentMember.Name >= '2016/01/11 07:45'
AND
[Creation Date].[Minute].CurrentMember.Name <= '2016/01/11 23:59'
)
)
SELECT
{[Measures].[Sales Count]} ON COLUMNS
,{[Creation Date].[2016].[2016/01].[2016/01].[2016/01/11]} ON ROWS
FROM [Sales Star Schema];
this query returns me a correct value, because aggregated views contains value for 2016 year, 2016/01 month, 2016/01/11 day. How i might to change my query structure so that it returns me not an exception in 2017 year's values, but an empty value?