Optical differentiation plays a pivotal role in analog computing and image processing, owing to its faster operating speeds and lower power consumption. However, the conventional differentiator encounters a common issue of single and fixed functions due to the lack of effective dynamic modulation means. Here, we proposed a polarization-sensitive differentiator based on a Fano resonance metasurface. The interference between transmitted light and a quasi-guided mode induces Fano resonance, resulting in the leakage of high-frequency component of the p-wave. By adjusting the asymmetry and line width of the Fano resonance line shape, the metasurface can function as a Fourier spatial filter to achieve the differential of an incident beam. Additionally, the direction of the s- and p-wave can be controlled to realize multiple differential functions. We demonstrate the simulation of switchable differential between arbitrary one-dimensional (1D) direction and two-dimensional (2D) directions, with a numerical aperture up to 0.26. It is expected that this switchable optical differentiator will have broad applications in areas such as bioimaging and computer vision.