Ver originalWITH T AS(SELECT *, MAX(CASE WHEN Mes=21 THEN Cantidad END) OVER(Partition BY Articulo, Deposito) Cantidad21FROM MiTabla)SELECT *FROM TWHERE IsNull(Canidad21,0)<>0;