# Database Discussions > MDX and Analysis Services >  i need support for function count() ....

## kr6410

hello forum,
i´m sure somebody can support me. I defined this MDX

SELECT  
{ [Measures].[Sales], [Measures].[Amount] } ON COLUMNS

NONEMPTY({ [Dim Customer].[Customer ID].[Customer ID].ALLMEMBERS *   
           [Time].[Month].CHILDREN 
}) DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS  

FROM [MyCube]

The result shows for each customer and month how many sales the customer has in the corresponding month.

CustomID / Month / Sales / Amount
1 / 2013 01 / 123 / 2234
1 /         2013 02 /      2 /               95
1 /         2013 03 /      212 /           11111
2 /         2013 01 /      122 /          2121
2 /         2013 02 /      231 /          3333

In the result i see now the customer #1 made 123 sals from Jan.1  up to Jan.31.
I want to know now: on how manny days the customer has no sales for the corresponding month.

CustomID / Month / Sales / Amount / DaysNoSale
1 /         2013 01 /      123 /       2234 /                  3
1 /         2013 02 /      2 /              95 /               26
1 /         2013 03 /      212 /          11111 /              0
2 /         2013 01 /      122 /          2121 /                0
2 /         2013 02 /      231 /          3333 /               0


please, give me a tip or show me a correct solution.
thanks forward

----------

