If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

YTD Average Sales

Started by gdunster, 06 Sep 2013 04:31:46 PM

Previous topic - Next topic

gdunster

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

blom0344

_day_of_year(current_date) yields the value you need as an integer. Use it within a calculation


gdunster

Thank you that did work.