Link to home
Start Free TrialLog in
Avatar of rhservan
rhservanFlag for United States of America

asked on

How does SSAS interpret NULL & Zeroes regarding counts?

I have a measure where the data in the column is based on currency.  The results of the stored procedure which creates this column and inserts data looks like this:

<blank>  Stored Procedure uses a CASE statement and the ELSE is NULL (is <blank> correct?)
   0.00
130.00

I want to perform a count on everything that IS NOT NULL.
How can I do this in my cube?
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rhservan

ASKER

Does aggregate functions COUNT on zeroes as well?
Ignore question above this one.

Do aggregate functions count on zeroes?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sean Stuber
Sean Stuber

if you want your count to ignore zero values as well as null's then try something like this...



select count(case when your_column = 0 then null else your_column end) from your_table