partial #2252 - Historical Churn and Historical Churn Rate
This commit is contained in:
parent
7ebae3803a
commit
8a5a805588
@ -82,7 +82,12 @@ class Crunchbutton_Chart_Churn extends Crunchbutton_Chart {
|
||||
$activeForwardDaysPlusOne = $activeUsers[ ( $i + $daysForward + 1 ) ]->Total;
|
||||
$newForwardDays = $newUsers[ ( $i + $daysForward ) ]->Total;
|
||||
$newForwardDaysPlusOne = $newUsers[ ( $i + $daysForward + 1 ) ]->Total;
|
||||
$churn = ( ( $activeForwardDays + $newForwardDaysPlusOne ) - $activeForwardDaysPlusOne );
|
||||
if( $activeForwardDaysPlusOne > 0 ){
|
||||
$churn = ( ( $activeForwardDays + $newForwardDaysPlusOne ) - $activeForwardDaysPlusOne );
|
||||
} else {
|
||||
$churn = 0;
|
||||
}
|
||||
|
||||
|
||||
$data[] = ( object ) array( 'Label' => $activeUsers[ $i ]->Label, 'Total' => $churn, 'Type' => 'Users' );
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user