COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: que1983 on 11 Apr 2016 03:27:12 PM

Title: Convert excel chart to cognos chart
Post by: que1983 on 11 Apr 2016 03:27:12 PM
Enclosed is an excel chart I am trying to convert to cognos.  The issue is I have a set of dates and totals.  I want to segment the dates by week and present  a weekly snapshot via chart.  I am very new to cognos and have purchased several books that do not provide good examples.  If someone has answers and perhaps some sample code that would help greatly.
Title: Re: Convert excel chart to cognos chart
Post by: BigChris on 12 Apr 2016 02:07:52 AM
You should be able to calculate the week commencing date...always assuming you don't already have a calendar table. Depending on your database you probably want something along the lines of:

_add_days([Lock Expiration Date],-_day_of_week([Lock Expiration Date],1))

That should give you the Sunday at the start of each week.
Title: Re: Convert excel chart to cognos chart
Post by: Lynn on 12 Apr 2016 02:20:08 AM
Feels like deja vu all over again. You might do better continuing an existing thread rather than posting a new thread for the same thing so that the continuity and big picture of your situation isn't scattered across different posts.

http://www.cognoise.com/index.php/topic,30434.msg98931.html#msg98931

BigChris has provided a good expression to use for weeks on the X-axis. I think if you put the two measures in the series, as I said in the other post, then the figures will automatically aggregate by week.