我有一个数据集,该数据集的度量值为0,因此我想在查询中将其过滤掉。但是我似乎无法做到。
它不起作用,或者我使查询崩溃。我试过使用Haveing和Filter,但均无效。这最后一个使查询崩溃,想知道是否有人可以看到我要去哪里错了?
SELECT NON EMPTY
{ [Measures].[Inv Avail] } HAVING [Measures].[Inv Avail] <> 0 ON COLUMNS,
NON EMPTY { Filter(
(
[Date].[Day].[Day].ALLMEMBERS *
[Product].[SKU ID].[SKU ID].ALLMEMBERS *
[Product].[Desc].[Desc].ALLMEMBERS *
{[Warehouse].[Warehouse Code].[4552]}) }
,[Measures].[Inv Avail] > 0)
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM (
SELECT ( {
StrToMember('[Date].[Week].&[48]')
} ) ON COLUMNS
FROM [Warehouse Inventory])
答案 0 :(得分:1)
这应该有效。您的行轴出现括号问题
SELECT NON EMPTY
[Measures].[Inv Avail] ON COLUMNS,
NON EMPTY {
Filter(
(
[Date].[Day].[Day].ALLMEMBERS *
[Product].[SKU ID].[SKU ID].ALLMEMBERS *
[Product].[Desc].[Desc].ALLMEMBERS *
[Warehouse].[Warehouse Code].[4552]
)
,[Measures].[Inv Avail] > 0)
}
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM (
SELECT ( { StrToMember('[Date].[Week].&[48]') } ) ON COLUMNS
FROM [Warehouse Inventory]
)