COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: que1983 on 08 Apr 2016 02:43:33 PM

Title: Grouping dates by week instead of min to max
Post by: que1983 on 08 Apr 2016 02:43:33 PM
Please see diagram enclosed.  It groups all dates individually from min to max. 

cast([min_lock_date],varchar(10))+' '+cast([max_lock_date1],varchar(10)) this formula produces the minimum date and max date of the lock date.  I want this data item to select the min and max based on one week intervals instead of just one min and max date.  The aggregate function does not allow me to summarize based on another data item so how would I accomplish this in a weekly grouping
Title: Re: Grouping dates by week instead of min to max
Post by: BigChris on 11 Apr 2016 05:45:59 AM
You probably want to include a _week_of_year calculation in your query.