![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----Original Message----- I have the following MDX in which I am trying to return the Producers in a particular state for the years 1999 to 2002. Even though I am using the NonEmptyCrossJoin function, my result set contains a lot of empty rows. Out of a total of 39000 rows returned a majority of them contain no data. How can I just return only the rows that have data. I would appreciate any help I can get on this. Thanks The MDX I am using is: WITH MEMBER [Risk State].[Risk States] As 'SUM({[Risk State]. [19]})' SET [Accident Years] As 'FILTER([Accident Date].Year.Members, [Accident Date].CurrentMember.Name>= "1999" And [Accident Date].CurrentMember.Name<= "2002")' SELECT {Measures.Members} ON AXIS(0) , NonEmptyCrossJoin([Accident Years], Except ({[Producer Name].Members}, {[Producer Name].[All Producer Name]})) ON Axis(1) FROM [Vehicle Pricing] WHERE [Risk State].[Risk States] . |
#3
| |||
| |||
|
| WITH |
#4
| |||
| |||
|
|
The problem may be that the NonEmptyCrossJoin does not implicitly filter on the Where Slicer, namely the State. If so, try this version of the query with explicit State: WITH MEMBER [Risk State].[Risk States] As 'SUM({[Risk State]. [19]})' SET [Accident Years] As 'FILTER([Accident Date].Year.Members, [Accident Date].CurrentMember.Name>= "1999" And [Accident Date].CurrentMember.Name<= "2002")' SELECT {Measures.Members} ON AXIS(0) , NonEmptyCrossJoin([Accident Years], Except ({[Producer Name].Members}, {[Producer Name].[All Producer Name]}), {Risk State].[19]}, 2 ) ON Axis(1) FROM [Vehicle Pricing] WHERE [Risk State].[Risk States] - Deepak *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
| |||
| |||
|
| with set myset as '{[Store].[All Stores].[Canada]}' |
#6
| |||
| |||
|
|
Richard, One thing that is not clarified about NECJ() in BOL is the difference in behavior of a calculated member in the 'Where' Slicer vs. in the argument list itself. In the latter case, the default (All) member is apparently not substituted. For example, this version of the Foodmart query will always return no rows, even if 'myset' includes USA: with set myset as '{[Store].[All Stores].[Canada]}' member store.x as 'sum(myset)' select measures.members on 0, nonemptycrossjoin([Product].[Brand Name].members, [Time].[Month].members, {store.x}, 2) on 1 from warehouse where (store.x) - Deepak *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Hi Richard, Thanks for pointing out the difference in the NECJ behavior of the Measures dimension - I recall running across this one time, but was too perplexed to make sense of it. Because of the potential pitfalls in using NECJ for novice users, is there any chance that future editions of BOL will expound on these NECJ nuances in greater detail? - Deepak *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#9
| |||
| |||
|
|
Hi Richard, Thanks for pointing out the difference in the NECJ behavior of the Measures dimension - I recall running across this one time, but was too perplexed to make sense of it. Because of the potential pitfalls in using NECJ for novice users, is there any chance that future editions of BOL will expound on these NECJ nuances in greater detail? - Deepak *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
![]() |
| Thread Tools | |
| Display Modes | |
| |