We analyze the use of measures of the minimal norm to control elliptic and parabolic equations. We prove the sparsity of the optimal control. In the parabolic case, we prove that the solution of the optimization problem is a Borel measure supported in a set of Lebesgue measure zero. In both cases, the approximate controllability can be achieved efficiently by means of controls that are activated in some finite number of pointwise locations. We also analyze the corresponding dual problem.