Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight table display '0' for 'Count' expression

Hi, I'm using straight table, which consists of 3 columns (Month,site,name), to count the duplicate rows for each distinct row by the expression 'TotalCount(Month)'. There are some months which do not have any data in the other 3 columns so it's only the 'Month' column displaying the months, but the TotalCount(Month) column, that counts the duplicate rows for each distinct row, displays '1'. Is there any way I can change it to '0'? As I want to display all the months to avoid confusion as to why not all months are displayed. Example below. Thanks.

current:

Month

Site

Name

TotalCount(Month)

01/2012

AS

A

5

01/2012

XD

C

21

02/2012

-

-

1

03/2012

-

-

1

I want it to be:

Month

Site

Name

TotalCount(Month)

01/2012

AS

A

5

01/2012

XD

C

21

02/2012

-

-

0

03/2012

-

-

0

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Then, check null any one of the dimension additionally like:

If( Count(Month)=1 and Isnull(Name),0,Count(Month))

View solution in original post

4 Replies
tresesco
MVP
MVP

Something like: = If( Count(Month)=1,0,Count(Month))  ?

Not applicable
Author

But thr r rows where all columns are filled but only appeared once in the dataset so for some cases, '1' is correct.

tresesco
MVP
MVP

Then, check null any one of the dimension additionally like:

If( Count(Month)=1 and Isnull(Name),0,Count(Month))

its_anandrjs

Write a expression like

=If(Count(Month) = 1, 0, Count(Month) )

And in presentation properties >> Uncheck the Suppress Zero-Values

Other wise you can add a field in the load script also let me know.