WITH the set [by all members of the current calendar date] as
PERIODSTODATE
([CalendarDate] [Calendar Date] [ALL] level
[CalendarDate] [Calendar Date] currentmember
)
MEMBER [payment days not knot real ocean shipping ultra 1 to 6 months] AS
Aggregate
(
(ParallelPeriod
([OverdueCalendarDate] [Calendar Date] [Calendar Month]
6,
, STRTOMEMBER (" [OverdueCalendarDate]. [Calendar Date] [Calendar Month]. & amp; [" + [years] calendar date belong to + "] & amp; [" + [month calendar date belong to] + "] ")
)
:
STRTOMEMBER (" [OverdueCalendarDate]. [Calendar Date] [Calendar Month]. & amp; [" + [years] calendar date belong to + "] & amp; [" + [month calendar date belong to] + "]. PREVMEMBER ")
)
* PERIODSTODATE ([CalendarDate]. [Calendar Date] [ALL] level, [CalendarDate] [Calendar Date] currentmember)
, [Measures] [WholeSaleSellIncome - FactCustomization]
)
MEMBER [2 payment days not knot real ocean shipping ultra 1 to 6 months] AS
Aggregate
(
(ParallelPeriod
([OverdueCalendarDate] [Calendar Date] [Calendar Month]
6,
, STRTOMEMBER (" [OverdueCalendarDate]. [Calendar Date] [Calendar Month]. & amp; [" + [years] calendar date belong to + "] & amp; [" + [month calendar date belong to] + "] ")
)
:
STRTOMEMBER (" [OverdueCalendarDate]. [Calendar Date] [Calendar Month]. & amp; [" + [years] calendar date belong to + "] & amp; [" + [month calendar date belong to] + "]. PREVMEMBER ")
)
* [by all the members of the current calendar date]
, [Measures] [WholeSaleSellIncome - FactCustomization]
)
SELECT
{[payment days not knot real ocean shipping ultra 1 to 6 months]
, [2 payment days not knot real ocean shipping ultra 1 to 6 months]
}
DIMENSION PROPERTIES PARENT_UNIQUE_NAME HIERARCHY_UNIQUE_NAME, CUSTOM_ROLLUP UNARY_OPERATOR, KEY0 ON 0
The NON EMPTY
(
[CalendarDate]. [Calendar Month]. [Calendar Month]. Members
)
DIMENSION PROPERTIES PARENT_UNIQUE_NAME HIERARCHY_UNIQUE_NAME, CUSTOM_ROLLUP UNARY_OPERATOR, KEY0 ON 1
The FROM XXX
[payment days not knot real ocean shipping ultra 1 to 6 months] and [2 payment days not knot real ocean shipping ultra 1 to 6 months] query why not consistent,
1, from the original data to check "[payment days not knot real ocean shipping ultra 1 to 6 months]" is right;
2 [2 payment days not knot real ocean shipping ultra 1 to 6 months] the query speed is much higher than [payment days not knot real ocean shipping ultra 1 to 6 months], for some reason,
CodePudding user response:
Feeling a little look not to understand, you the PERIODSTODATE above is a function? Is not the same as the below