We have made a Dynamic Nanoindentation Microscope (DNM) setup based on sample modulation, in order to allow a direct comparison between various dynamical mechanical measurement techniques such as Force Modulation Microscopy (FMM) and Dynamic Mechanical Analysis (DMA). The microscope is integrated to a standard Atomic Force Microscope (AFM) and uses a commercial nanoindentation system. Instead of the standard bimorph and force modulation configuration, we used a stacked ceramic sample actuator in displacement modulation. Both DMA measurements and DNM imaging were performed on each sample for the determination of the reduced, storage and loss modules, and a good agreement between the techniques have been found. Compared to FMM, we show that DNM has the advantage of always keeping the same contrast in the viscoelastic images as a function of the frequency.