Views Custom Join change the 'on' condition
I ended up using hook_query_alter rather than hook_views_query_alter

/**
 * Implements hook_query_alter().
 */
function custom_query_alter(QueryAlterableInterface $query) {
  if ($query-&gt;hasTag('line_itmes_qty')) {
    $query-&gt;join('line_items_tally', 't', 't.n &lt;= commerce_line_item.quantity');
  }
}