I finally did it. Look at the answer here: https://techblog.retabet.es/powerbi-e-historicos-de-cambios-de-estado/