I need to calculate the YTD average sales in a list report. I can sum all the sales YTD but then need to divide them by the number of days in the year as of current date. Example today is Sept. 6, 2013, this is the 248 calendar day of the year and tomorrow it the 249th day. How do I get this variable into my calculation within the list report?
I can get the number of days of the year from the date dimension/table but when I add it to the rows of data it duplicates big time the number of rows. If I create two seperate queries and join them by product it still duplicates the rows.
Any recommendations? Garry
_day_of_year(current_date) yields the value you need as an integer. Use it within a calculation
Thank you that did work.