Applying template in measure pipe.