您好目前我有一个要求,即用户想要查看一个月中每天的MTD值。例如最近30天的MTD号码。我有这个查询工作1天
with
set [today2] as strtoset('[Date].[Call Day].&['+ format(now()-15,'yyyy-MM-ddT00:00:00')+ ']')
member [measures].[MTD_Deno] as sum(
periodstodate([Date].[Month],[today2].item(0)),[Measures].[NCH])
member [Measures].[MTD_Num] as sum(
periodstodate([Date].[Month],[today2].item(0)),[Measures].[CSSC OUT])
select { [measures].[MTD_Deno],[Measures].[MTD_Num],[Measures].[NCH],
[CSSC OUT], [FSC OUT], [HSI OUT],
[EVRC OUT], [Transfers], [Conference], [TOS_OUT],
[TPV_OUT], [CREDIT VER OUT], [Pay By Phone OUT]
}
on columns,
non empty([Location Name].[Location Name],[Area].&[Mid Atlantic] as Area,
strtomember('[Date].[Call Day].&['+ format(now()-13,'yyyy-MM-ddT00:00:00')+ ']')
)
on rows
from [Outbound_Summary]
where (
{[Center Function].&[Online],[Center Function].&[Redirect]},
{[Center Type].&[CSSC]}
);
但是我希望看到过去30天的数据,有没有办法实现这一目标。