Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
crosstab week-of-year
vpoojari
I am using week-of-year of datacube, which is working perfect, but the headers are the week of year in numeric. I want to show start and end date in the header for the week which would be more explanatory for the end user.
1 2 3
1500 9890 98990
26Jan-1Jan 2Jan-8Jan 9Jan-15Jan
1500 9890 98990
Find more posts tagged with
Comments
mcremer
<blockquote class='ipsBlockquote' data-author="'vpoojari'" data-cid="81998" data-time="1314535748" data-date="28 August 2011 - 05:49 AM"><p>
I am using week-of-year of datacube, which is working perfect, but the headers are the week of year in numeric. I want to show start and end date in the header for the week which would be more explanatory for the end user.<br />
<br />
<br />
1 2 3<br />
<br />
1500 9890 98990<br />
<br />
<br />
26Jan-1Jan 2Jan-8Jan 9Jan-15Jan<br />
<br />
1500 9890 98990<br /></p></blockquote>
<br />
<br />
You could use a java script on that dataobject somting like:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
// We know week number and year.
int week = 3;
int year = 2010;
// Get calendar, clear it and set week number and year.
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(Calendar.WEEK_OF_YEAR, week);
calendar.set(Calendar.YEAR, year);
// Now get the first day of week.
Date date = calendar.getTime();
</pre>
vpoojari
dimension["averageDSODate"]["week-of-year"] this will give me week of the year information
How will I get year information?
mcremer
<blockquote class='ipsBlockquote' data-author="'vpoojari'" data-cid="82013" data-time="1314617956" data-date="29 August 2011 - 04:39 AM"><p>
dimension["averageDSODate"]["week-of-year"] this will give me week of the year information<br />
How will I get year information?<br /></p></blockquote>
You will to fasilitise that in your cube. Meaning or your data set should provide it becouse a week of the year without knowing what year is a bit hard to specifiy what week of the year is (1st week can be still having month in december if you use the ISO norm).