WITH MEMBER [Measures].[Full Date] as 'NOW()'
-- The Second Calculated Member is the Day part of the first calculated member.
MEMBER [Measures].[What Day] as 'DAY([Full Date])'
-- The Third Calculated Member is the Month part of the first calculated member.
MEMBER [Measures].[What Month] as 'MONTH([Full Date])'
-- The Fourth Calculated Member is the Year part of the first calculated member.
Member [Measures].[What Year] as 'YEAR([Full Date])'
member [Measures].[What quarter] as 'Datepart(''q'',now())'
SELECT
{[Full Date],[What Day],[What Month],[What Year],[What quarter]} ON COLUMNS
FROM [adventure works]
MDX函数妙用-获取当前相关日期
最新推荐文章于 2021-04-13 13:32:02 发布
