21.03.2024, 10:18
You need to specify a different date period to get monthly data:
Example for yearly data: https://kb.logicmachine.net/libraries/trends/#examples
Code:
dates = {}
dates['start'] = os.date('*t')
dates['start'].month = dates['start'].month - 1
dates['end'] = os.date('*t')
month = trends.fetchone(' MAIN ', dates)
Example for yearly data: https://kb.logicmachine.net/libraries/trends/#examples