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函数妙用-获取当前相关日期
最新推荐文章于 2024-08-28 10:11:15 发布