![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The problem is that the query below filters by TopCount before it does the Non Empty. There are several rows within the 20 that have a null value for [sales units]. Null evidently equates to zero, because I have some rows that have a value of -1 for [sales units] that I don't see unless I set the TopCount value much higher. (I use TopCount = 20, I get 6 rows; I use TopCount = 50, I get 12 rows) I would like to have the Non Empty inside the TopCount, but I haven't been able to figure out how to do it. SELECT NON EMPTY { [Measures].[sales units]} ON COLUMNS, NON EMPTY { TOPCOUNT ( ([Product].[Style Label].[Style Label].ALLMEMBERS) ,20, [Measures].[sales units]) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [MY CUBE])) WHERE ([Date].[Week End Date].&[2006-01-28T00:00:00] |
#3
| |||
| |||
|
|
The problem is that the query below filters by TopCount before it does the Non Empty. There are several rows within the 20 that have a null value for [sales units]. Null evidently equates to zero, because I have some rows that have a value of -1 for [sales units] that I don't see unless I set the TopCount value much higher. (I use TopCount = 20, I get 6 rows; I use TopCount = 50, I get 12 rows) I would like to have the Non Empty inside the TopCount, but I haven't been able to figure out how to do it. SELECT NON EMPTY { [Measures].[sales units]} ON COLUMNS, NON EMPTY { TOPCOUNT ( ([Product].[Style Label].[Style Label].ALLMEMBERS) ,20, [Measures].[sales units]) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [MY CUBE])) WHERE ([Date].[Week End Date].&[2006-01-28T00:00:00] |
#4
| |||
| |||
|
|
Here is a sample code of NONEMPTY inside of TOPCOUNT based on AS2005 Adventure Works sample. select [Measures].[Reseller Sales Amount] on 0, topcount( nonempty( [Promotion].[Promotions].[Promotion] ) , 3 , [Measures].[Reseller Sales Amount] ) on 1 from [Adventure Works] HTH.. ZULFIQAR SYED HTTP://ZULFIQAR.TYPEPAD.COM cowznofsky wrote: The problem is that the query below filters by TopCount before it does the Non Empty. There are several rows within the 20 that have a null value for [sales units]. Null evidently equates to zero, because I have some rows that have a value of -1 for [sales units] that I don't see unless I set the TopCount value much higher. (I use TopCount = 20, I get 6 rows; I use TopCount = 50, I get 12 rows) I would like to have the Non Empty inside the TopCount, but I haven't been able to figure out how to do it. SELECT NON EMPTY { [Measures].[sales units]} ON COLUMNS, NON EMPTY { TOPCOUNT ( ([Product].[Style Label].[Style Label].ALLMEMBERS) ,20, [Measures].[sales units]) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [MY CUBE])) WHERE ([Date].[Week End Date].&[2006-01-28T00:00:00] |
![]() |
| Thread Tools | |
| Display Modes | |
| |