![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
-----Original Message----- How can I use the filter function to show totals for the entire company without including one store? Here is an example from FoodMart using a calculate Member (I did not include ever store in this example): WITH MEMBER [Store].[Company1] AS 'Aggregate({[Store].[All Stores].[Canada].[BC].[Vancouver].[Store 19], [Store].[All Stores].[Canada].[BC].[Victoria].[Store 20], [Store].[All Stores].[Mexico].[DF].[Mexico City].[Store 9], [Store].[All Stores].[USA].[WA].[Bellingham].[Store 2], [Store].[All Stores].[USA].[WA].[Bremerton].[Store 3], [Store].[All Stores].[USA].[CA].[Los Angeles].[Store 7], [Store].[All Stores].[USA].[CA].[Beverly Hills].[Store 6]})' select { [Measures].[Units Shipped], [Measures].[Units Ordered] } on columns from Warehouse where [Company1] I know I can do the following to list every store except say store 6: select { [Measures].[Units Shipped], [Measures].[Units Ordered] } on columns, NON EMPTY Filter([Store].[Store Name].members, [Store].CurrentMember.Name <> "Store 6") on rows from Warehouse But this same approach is useless when I try to sum for the company, like this: select Filter({ [Measures].[Units Shipped], [Measures]. [Units Ordered] }, [Store].CurrentMember.Name <> "Store 6") on columns from Warehouse Any suggestions? . |
#2
| |||
| |||
|
|
It sounds like you want something like this: WITH member Store.SumOfSomeStores as 'Aggregate(Filter(Store.Members, [Store].CurrentMember.Name <> "Store 6"))' select { [Measures].[Units Shipped], [Measures].[Units Ordered] } on 0, {SumOfSomeStores} on 1 from Warehouse - Matt Carroll -- This posting is provided "AS IS" with no warranties, and confers no rights. "Chris Umbaugh" <chrisumbaugh (AT) toast (DOT) net> wrote in message news:ea8YX7CXDHA.2284 (AT) TK2MSFTNGP10 (DOT) phx.gbl... How can I use the filter function to show totals for the entire company without including one store? Here is an example from FoodMart using a calculate Member (I did not include ever store in this example): WITH MEMBER [Store].[Company1] AS 'Aggregate({[Store].[All Stores].[Canada].[BC].[Vancouver].[Store 19], [Store].[All Stores].[Canada].[BC].[Victoria].[Store 20], [Store].[All Stores].[Mexico].[DF].[Mexico City].[Store 9], [Store].[All Stores].[USA].[WA].[Bellingham].[Store 2], [Store].[All Stores].[USA].[WA].[Bremerton].[Store 3], [Store].[All Stores].[USA].[CA].[Los Angeles].[Store 7], [Store].[All Stores].[USA].[CA].[Beverly Hills].[Store 6]})' select { [Measures].[Units Shipped], [Measures].[Units Ordered] } on columns from Warehouse where [Company1] I know I can do the following to list every store except say store 6: select { [Measures].[Units Shipped], [Measures].[Units Ordered] } on columns, NON EMPTY Filter([Store].[Store Name].members, [Store].CurrentMember.Name <> "Store 6") on rows from Warehouse But this same approach is useless when I try to sum for the company, like this: select Filter({ [Measures].[Units Shipped], [Measures].[Units Ordered] }, [Store].CurrentMember.Name <> "Store 6") on columns from Warehouse Any suggestions? |
![]() |
| Thread Tools | |
| Display Modes | |
| |