Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
chan103148
Contributor III
Contributor III

conversion rate

good day,

 

need help

I need to compute for conversion rate by dividing Traffic count from Transaction count,

 

problem is there are dates that have no foot traffic count, that causes abnormality in my data.

I want to include only Transaction count with corresponding Traffic count greater than zero on a daily basis.

current script:

(Count({$<[Date.autoCalendar.Year]= {"2020"}>} distinct [Transaction Number]))

/

(Sum({$<[Date.autoCalendar.Year]={"2020"},[Traffic In]={">0"}>}[Traffic In]))

 
 
 

Capture.JPG

in the graph above, the computed Conversion rate is 22% which should be 4% only

advance thankyou,

Christian

Labels (2)
2 Replies
sagarjagga
Creator
Creator

You can use a measure like-

(Count({$<[Date.autoCalendar.Year]= {"2020"},[Transaction Number]={"=count(disinct [Traffic In])>0"}>} distinct [Transaction Number]))

 

Can you please share your expected output and sample data in a table form. 

chan103148
Contributor III
Contributor III
Author

didn't work

 

DateTraffic InTransaction NumberConversion
2/17/202010844%
2/18/202007-
2/19/202005-
2/20/2020220105%
2/21/2020017-
2/22/2020016-
2/23/2020013-
    
current computation3287222%
    
desired computation328144%

 

compute conversion only those dates with both traffic and transaction count.

disregard the date without traffic count.