Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Starting day of week on BIRT charts
Bharath406
Hi,
I'm trying to aggregate the chart data by week. When I do that from "Select Data" tab and Grouping it by Weeks, it seems like Sunday is the starting day of the week. Is there any way that I could customize so as to show Monday as the starting day.
In general, I need Monday to Sunday weeks.
Find more posts tagged with
Comments
mwilliams
Hi Bharath406,
You could create a computed column in your dataSet that figures the first day of the week based on your scale of mon - sun and use that as your x-axis category.
Bharath406
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="65450" data-time="1276184260" data-date="10 June 2010 - 08:37 AM"><p>
Hi Bharath406,<br />
<br />
You could create a computed column in your dataSet that figures the first day of the week based on your scale of mon - sun and use that as your x-axis category.<br /></p></blockquote>
<br />
Thanks Michael. I was searching for an alternative other than the computed column. Thanks again.<br />
<br />
-- Bharath
kallem
Hi,
I have the same problem as Bharath. I do also need monday as starting day of week. Has anyone found solution for this?
Thanks,
Kalle
mwilliams
Hi Kalle,
You can create a computed column to set your own week values and use that in your chart.
kallem
I did notice that from earlier post already, but as for Bharath it wasn't what I was looking for. I did check how week start day selection is coded and I noticed that sunday is fixed and there is no options included. I did post an enhancement request for week starting day selection.
- Kalle
birtprofi
Hello,
for example you can work with this sql:
extract (week from aus_datum) as KW,
extract (month from aus_datum) as Monat,
extract (day from aus_datum) as Tag,
extract (weekday from aus_datum) as Wochentag
with "week" you get the european calendarweek, an if you sort week and than day, you should have Mo-Su
or I have got few weeks ago, this script from mwilliams. This works also quite well.
var startDate = params["pStartDate"].value;
var endDate = params["pEndDate"].value;
importPackage(Packages.java.util);
importPackage(Packages.java.text);
dateRangeStart = Calendar.getInstance();
dateRangeStart.setTime(startDate);
dateRangeEnd = Calendar.getInstance();
dateRangeEnd.setTime(endDate);
dateRangeIntervalType = Calendar.DATE;
dateRangeFormatter = new SimpleDateFormat("yyyy-MM-dd");
currentMonth = null;
currentWeek = null;
currentDay = null;
kind regards
rafael
kallem
Thanks Rafael, I will go with that unless it happens that starting day option gets added. I don't need week grouping yet but eventually it will be needed in our software.
- Kalle
mwilliams
Rafael,
This could be a good tip to add to the devShare for others to find.