Donaldson Co. reported a net loss for the second quarter, but when one-time charges including $109.7 million for changes in the federal tax law are excluded, adjusted earnings were up 23 percent over the same quarter last year.

Still, the adjusted earnings fell a penny below what Wall Street analysts expected.

Sales were up 21 percent to $664.7 million for the quarter ended Jan. 31.

“Market strength combined with benefits from consistent execution of our strategy drove notable sales increases across our business last quarter, and we expect to be at the high end of the full-year sales forecast we provided last quarter,” said President and CEO Tod Carpenter in a company release on Tuesday.

It now expects fiscal 2018 sales to grow between 13 and 15 percent, compared to prior guidance of a 10 to 14 percent sales increase.

The biggest sales increase is expected to come from the Engine Products segment, where full-year sales are expected to grow 17 to 19 percent, compared to prior guidance of 13 to 17 percent.

The company encountered some pressure on margins in the second quarter due to rising raw material costs, interest rates, wages and product mix from growth of some lower-margin products to original equipment customers. The second-quarter operating margin was 12.3 percent compared with 12.6 percent a year ago.

Carpenter told analysts on the earnings call that Donaldson has been raising prices on products while minding costs and operating efficiencies.

For the second quarter, the net loss was $52.9 million, or 40 cents a share, compared with earnings of $46.5 million, or 35 cents a share, in the same time period a year ago.

For the year, shares are down 8.5 percent, trading over the last 52 weeks in the range of $42.59 to $52.20.