Bifunctional metalens for generation of pure longitudinal magnetization focal spot with reversible magnetization direction is greatly desired for the miniaturization and integration of all-optical magnetic storage. In this paper, we demonstrate a bifunctional triplex metalens that integrates the functions of an azimuthal polarizer, a helical phase plate, and a focusing lens for all-optical magnetic storage. Constructing the triplex metalens with tetratomic macropixels, the direction of the longitudinal magnetization at the focal spot can be flexibly switched by reversing the handedness of the incident light. Nearly perfect circularly polarized focal spot for left-handed or right-handed incident polarization are experimentally demonstrated, which is well consistent with the numerical simulations. The proposed bifunctional triplex metalens paves the way for the application of metalens in all-optical magnetic storage.