![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi group! How can I add more filters ( [Store Type] and [Promotion Media] ) in this MDX query: WITH SET [LastMonth] AS ' Tail(Filter([Time].[Month].Members, Not IsEmpty([Time].CurrentMember)), 1) ' SET [Last7Months] AS ' [LastMonth].item(0).item(0).Lag(6) : [LastMonth].item(0).item(0) ' SELECT [Last7Months] ON COLUMNS, {[Measures].[Unit Sales]} ON ROWS FROM Sales WHERE ([Store].[All Stores].[USA].[WA]) -- AND [Store Type].[All Store Type].[Supermarket] -- AND [Promotion Media].[All Media].[Radio] I know I can't put more than one condition after WHERE, but what is the solution ? Thanks. VK |
#3
| |||
| |||
|
|
Hi group! How can I add more filters ( [Store Type] and [Promotion Media] ) in this MDX query: WITH SET [LastMonth] AS ' Tail(Filter([Time].[Month].Members, Not IsEmpty([Time].CurrentMember)), 1) ' SET [Last7Months] AS ' [LastMonth].item(0).item(0).Lag(6) : [LastMonth].item(0).item(0) ' SELECT [Last7Months] ON COLUMNS, {[Measures].[Unit Sales]} ON ROWS FROM Sales WHERE ([Store].[All Stores].[USA].[WA]) -- AND [Store Type].[All Store Type].[Supermarket] -- AND [Promotion Media].[All Media].[Radio] I know I can't put more than one condition after WHERE, but what is the solution ? Thanks. VK |
#4
| |||
| |||
|
|
Thank you for quick replay! Can I ask you one more question: What if I need total sum from last 7 months (ONLY ONE number) something like that is not working: WITH SET [LastMonth] AS ' Tail(Filter([Time].[Month].Members, Not IsEmpty([Time].CurrentMember)), 1) ' SET [Last7Months] AS ' [LastMonth].item(0).item(0).Lag(6) : [LastMonth].item(0).item(0) ' SELECT {SUM([Last7Months],[Measures].[Unit Sales]} ON COLUMNS FROM Sales WHERE ([Store].[All Stores].[USA].[WA], [Store Type].[All Store Type].[Supermarket], [Promotion Media].[All Media].[Radio]) what should I change ? Thanks again. "VK" <vkaligari (AT) tis (DOT) hr> wrote in message news:OZvgehI0EHA.1300 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Hi group! How can I add more filters ( [Store Type] and [Promotion Media] ) in this MDX query: WITH SET [LastMonth] AS ' Tail(Filter([Time].[Month].Members, Not IsEmpty([Time].CurrentMember)), 1) ' SET [Last7Months] AS ' [LastMonth].item(0).item(0).Lag(6) : [LastMonth].item(0).item(0) ' SELECT [Last7Months] ON COLUMNS, {[Measures].[Unit Sales]} ON ROWS FROM Sales WHERE ([Store].[All Stores].[USA].[WA]) -- AND [Store Type].[All Store Type].[Supermarket] -- AND [Promotion Media].[All Media].[Radio] I know I can't put more than one condition after WHERE, but what is the solution ? Thanks. VK |
![]() |
| Thread Tools | |
| Display Modes | |
| |