Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Matrix Count

Author  Topic 

bukworm
Starting Member

10 Posts

Posted - 2011-06-12 : 05:13:39
Hi,

I have Quantity of item displayed in matrix as data.
how to get the count of non-zero data fields displayed in the matrix. If i use count as expression all the field including zeros is counted.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-06-12 : 05:15:01
use a case inside like

COUNT(CASE WHEN Field<> 0 THEN 1 ELSE NULL END)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

bukworm
Starting Member

10 Posts

Posted - 2011-06-12 : 06:28:20
sorry, where do i use this? I tried in the expression. it return an error.
Go to Top of Page
   

- Advertisement -