periodToDateSum(Revenue,{transaction_date},‘Year’,${Enddate})
The present formula works to fetch present-year revenue
The end date is a parameter that has an end date in the 2020 year format, I want to subtract it to one year and check the previous year total revenue, I tried the different ways mentioned below did not work, let me know if you have a workaround for this
Tried, Did not work:
periodToDateSum({Revenue}, {transaction_date}, ‘YEAR’, addDate({Enddate}, -1 * dateDiff(‘YYYY’, {Enddate}, ‘today’), 'YYYY’))
periodToDateSum({Revenue}, {transaction_date}, 'YEAR’, addDateTime({Enddate}, -1, 'YYYY’))