Azure billing schedule works only for most recent months.
It doesn't work for previous months before certain point of time.
For example, when running the schedule for a month in 2019, it works.
However when running it for any month in 2018, error is thrown.
Sample error message:
Cannot retrieve billing data from https://consumption.azure.com/v3/enrollments/xxxxx/usagedetails/download?billingPeriod=201812. Response code 400: Method failed: (/v3/enrollments/xxxxx/usagedetails/download) with code: 400
According to Azure billing API doc:
Code 400 means:
Invalid params – Date ranges, EA numbers etc.
Thus the cause is the data for previous month is not available in Azure for your account.
Please login the EA portal and verify.