Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chan103148
Contributor III
Contributor III

excluding zero values of other field from count distinct

good day,

 

my fields are:

Traffic In

Tseq No

 

I want to compute for the conversion

Count(distinct [Tseq No])/Sum([Traffic In])

 

how can I disregard Tseq No that has corresponding Traffic In value equivalent to zero in the computation?

 

thank you.

image1.jpg

 

Labels (1)
  • SaaS

11 Replies
anushree1
Specialist II
Specialist II

Go to Add ons -> Data Handling->Uncheck Include Zero Values

 
 
chan103148
Contributor III
Contributor III
Author

its not working

 

i need to remove "Transaction count" with corresponding zero "Traffic In" in the formula.

anushree1
Specialist II
Specialist II

can you share the sample file please.

 

chan103148
Contributor III
Contributor III
Author

here

anushree1
Specialist II
Specialist II

Add an if condition on all the expressions like:

=if(sum(traffic)>0,Sum(transactions))

if(sum(traffic)>0,Sum([Ave price]))

and so on.. This should fix the issue 

 

chan103148
Contributor III
Contributor III
Author

Count(distinct [Tseq No])/Sum([Traffic In])

*Tseq No  is transactions

*Traffic In is traffic

 

how can i remove transaction count with corresponding zero traffic in the formula above.

chan103148
Contributor III
Contributor III
Author

there are dates that has transactions but no traffic count.

anushree1
Specialist II
Specialist II

Use this:

if(sum(traffic)>0,Count(distinct transactions)/Sum(traffic))

chan103148
Contributor III
Contributor III
Author

not working 😞