Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
How to create a transaction report for more than 12 months of data > Assembly Build?
Hi All
I have several reports which look at transaction data going back 12 months.
A colleague has asked to look at some revenue figures going back to April 2021. This was was 21 months ago. I thought this would only involve a slight change to the formulas but something has gone awry.
The below gives me the data for this month:
DECODE(TO_CHAR({today},'MM') - TO_CHAR({trandate},'MM') + 21*(TO_CHAR({today},'YYYY')-TO_CHAR({trandate},'YYYY')),0,CASE WHEN {Type} = 'Assembly Build' THEN ABS({amount}) ELSE {amount} END)
However I tried this for last month:
DECODE(TO_CHAR({today},'MM') - TO_CHAR({trandate},'MM') + 21*(TO_CHAR({today},'YYYY')-TO_CHAR({trandate},'YYYY')),1,CASE WHEN {Type} = 'Assembly Build' THEN ABS({amount}) ELSE {amount} END)