I'm currently trying create a YTD Sales values for a selected date I've done YTD with a calendar script in a previous app with: inyeartodate(Date, '$(vtoday)', 0) * -1 AS YTD
Our customer wants to have the ability to select day, month and year and based on the selected date they want to see YTD values in a chart.
I'm writing the selection to the variable v_dateselection.
I'm not sure what's the best way to do this. Can someone help me? Thanks.