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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum or total the count of an 'if' expression

Hi,

I want to represent the following statement as a single number in a dashboard and not as a table:

 

if (count ({<Delivered -= {'0'}>}distinct Account)='0', count(Account), 0)

I've been able to do this previously with a normal 'count' statement by creating a Chart | Straight Table without any dimensions - this seems to total (sum) the results.  The above statement just comes up with a blank.

Thanks for any help.

5 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this in Text Object instead of Straight table

=if (count ({<Delivered -= {'0'}>}distinct Account) = 0, count(Account), 0)


Regards,

Jagan.

Not applicable
Author

Thanks Jagan - I didn't know the Text box could do that.

Appreciate your help - only problem is, it is returning a zero value.  Any ideas? or would i need to upload my data?

CELAMBARASAN
Partner - Champion
Partner - Champion

Which version of Qlikview desktop your are using?

Hope the below expression could help

if (count ({$-<Delivered = {'0'}>}distinct Account)=0, count(Account), 0)

jagan
Partner - Champion III
Partner - Champion III

Hi,

Upload your qlikview file and expected output values.

Regards,

jagan.

Joseph_Musekura
Support
Support

Hi,

Can you try the expression

1. Without the  modifier if (count ({$}distinct Account)=0, count(Account), 0)

2.   and  if (count ({1}distinct Account)=0, count(Account), 0)

3. Then add  a modifer if (count ({$ <Delivered = >}distinct Account)=0, count(Account), 0).  and so on...

    This could help to identify why you are getting 0

Regards,