| Split the results in to Financial Quarters [message #876480] |
Thu, 24 May 2012 13:32  |
A R Messages: 104 Registered: April 2012 |
Senior Member |
|
|
Hi,
I am working on a report which need to show the count based on year. Besides if the year is current year I need to split the results in to Financial quarters.
Sample date with the count is as follows:
ASSET_COUNT TARGET-DEPLOYMENT-DATE
5 5/31/12 12:00 AM
2 6/9/12 12:00 AM
2 5/17/12 12:00 AM
1 6/6/12 12:00 AM
1 5/25/12 12:00 AM
Please let me if nay details required further.
Thanks in advance
AR
|
|
|
|
| Re: Split the results in to Financial Quarters [message #877089 is a reply to message #876563] |
Fri, 25 May 2012 17:18   |
A R Messages: 104 Registered: April 2012 |
Senior Member |
|
|
Hi Jason,
Thanks a ton. It was really helpful. Jason, can u please help me improve the logic further. Here if I have year is current year I need to show count in quarters and if YEAR IS prev year I need to show count for complete year.
If I want to show the values in chart, is there any alternative other than using script? Attached the sample screen shot, from excel report.
Thanks
AR
[Updated on: Fri, 25 May 2012 19:34] Report message to a moderator
|
|
|
| Re: Split the results in to Financial Quarters [message #878409 is a reply to message #877089] |
Tue, 29 May 2012 04:49  |
Tomas Greif Messages: 52 Registered: September 2010 |
Member |
|
|
Hi,
you can add computed column to your dataset, something like:
if ( BirtDateTime.year(row["ORDERDATE"]) >= BirtDateTime.year(Now()))
BirtDateTime.year(row["ORDERDATE"]) + "Q" + BirtDateTime.quarter(row["ORDERDATE"])
else
BirtDateTime.year(row["ORDERDATE"])
Then you can use such column in chart on X axis with enabled grouping, sorted by date field. Depending on your data source you should consider adding such column directly to you data (e.g. using SQL), before import to birt.
Tomas
|
|
|
Powered by
FUDForum. Page generated in 0.02848 seconds