If you’re creating these as IFRAMEd widgets you could use javascript to build the IFRAME URL dynamically and calculate the equivalent of lastX at runtime.
For this particular use case I can’t deploy any other code, only utilise an iframe tag. I have other use cases that thankfully I don’t have to rely on such limitations and use Ajax and D3 to get and transform the data from Matomo.
I did resolve this issue though as lastX and previousX didn’t work in the VisitsSummary module, evolution_day_last_n=X did.