如何为度量有条件的查询创建缓存,还有其他更好的方法吗?
每次结果在 6 秒内返回,我想让它小于 2 秒
WITH MEMBER TotalPaidHigh AS SUM
(
Filter (
{
[Employee].[EmployeeID].Members},
[Measures].[Score] <= 4 AND
[Measures].[Score] >= 1
}
),
[Measures].[PaidAmount]
)
MEMBER TotalPaidLow AS
(
([Measures].[PaidAmount]) - (TotalPaidHigh)
)
SELECT
{
TotalPaidHigh, TotalPaidLow
} ON 0
FROM
[Cube]
WHERE
(
{
[Date].[Month].&[April 2011],
[Date].[Month].&[May 2011],
[Date].[Month].&[June 2011]
}
,[Geography].[State].&[NY]
)