嗨,我想知道如何使“iif”工作。
基本上,当发起人是“John Smith”时,我需要过滤工程“产品代码”。当前成员不工作或 iif 不工作,
SELECT
{
(
[Time].[Fiscal Hierarchy Time Calculations].[Month to Date],
[Measures].[Sell - Bookings]
)
} ON COLUMNS,
[Originators].[Originator One Letter Name].Children ON ROWS
FROM [Sales]
WHERE
(
[Time].[Fiscal Month].&[2010-02-01T00:00:00],
IIF
(
[Originators].[Originator One Letter Name].CurrentMember = "John Smith",
Except
(
[Product Codes].[Product Primary Subcategory].Children,
[Product Codes].[Product Primary Subcategory].&[ENGINEERING]
),
[Product Codes].[Product Primary Subcategory].Children
)
);
有任何想法吗?
提前致谢。
杜伊