Troubleshooting
Problem
Product: Impromptu Version: 7.0 Build: 554 Platform: Windows-all Description: How can I create a report that calculates the total sale for this year from the beginning of the year until today. Also, Total Sale for same period last year. year always starts on January 1 Solution: One sub report for each year YTD total. You will need to make use of sub-reports to be able to implement this calculation. The main report calculates the year to date total for current year. The filter should look like this: Date between 2002-01-01 and today() Where Date is the date column in your report and Today () is an Impromptu built in function that returns todays date. You can also use Oracle's now function instead. The sub-report calculates the YTD total for previous year. The filter should look like this: Date between 2001-01-01 and (datetime-to-date(add-years(Today(), -1))) add-years: Is a built in Impromptu function that given a certain date, it adds or subtracts a certain number of years as per value passed. Datetime-to-date: Is an Impromptu built in function that changes the format returned by add-years from datetime to date.
Log InLog in to view more of this document
Historical Number
108773
Was this topic helpful?
Document Information
Modified date:
09 May 2025
UID
swg21337010