Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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

8 Replies
Anonymous
Not applicable
Author

Can you share your app with dummy numbers?

Not applicable
Author

Sorry? I dont get it.

Not applicable
Author

Change the TotalCount(Month) expression with this:

=if(GetPossibleCount(Site)+GetPossibleCount(Name)>=2, TotalCount(Month), 0)

Not applicable
Author

if i add in one more column will it still be '>=2'? or will it be '>=3'?

Not applicable
Author

No, still didnt get 0...but thanks:)

Not applicable
Author

Yes!

its_anandrjs
Champion III
Champion III

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.

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.