Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dhasharadh
Creator III
Creator III

How to calculate the Avg of fully used Tariffs..??

Hi All.

my issue is bit confusing me. we have Tariffs(ex:mobile recharge plans) which will be sold and consumed we are reporting on consumption so we are tracking how many are consumed in a month, out of which how many are fully consumed (means consumed in the same month completely), Partially consumed (consumed in the 2 months like 15 days in March and 15 Days in April ex: recharged on Mar 15 so validity till Apr 15)

Now i need Average of Fully consumed passes in a month wise. below are the values look like, Now can any one suggest me how to calculate the avg of days to fully consume passes. thanks in advance.

the formula we are using is (NUM_OF_FULLY_CONSUMED * NUM_OF_DAYS)/SUM(NUM_OF_DAYS)

was not sure whether the above is correct or not please suggest.

3 Replies
vishsaggi
Champion III
Champion III

May be this?

= Sum(NUM_OF_FULLY_CONSUMED * NUM_OF_DAYS)
   /

   SUM(NUM_OF_DAYS)

dhasharadh
Creator III
Creator III
Author

thanks Nagaraju,

what is the wrong in the below expression :

= Sum({<TYPE={LDP} and NUM_OF_FULLY_CONSUMED<>0 >}AVG_DAYS_SUM) / Sum({<TYPE={LDP} and NUM_OF_FULLY_CONSUMED<>0>}NUM_OF_DAYS)

vishsaggi
Champion III
Champion III

Try this?

= Sum({< TYPE={'LDP'}, NUM_OF_FULLY_CONSUMED = {'<>0'} >} AVG_DAYS_SUM) /
Sum(TOTAL {< TYPE={'LDP'}, NUM_OF_FULLY_CONSUMED = {'<>0'} >} NUM_OF_DAYS) 

OR

= Sum({< TYPE={'LDP'}, NUM_OF_FULLY_CONSUMED -= {0} >} AVG_DAYS_SUM) /
Sum(TOTAL {< TYPE={'LDP'}, NUM_OF_FULLY_CONSUMED -= {0} >} NUM_OF_DAYS)