Qlik Community

Ask a Question

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
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 (2)
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 😞