Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to get percent of total in report(How to get percent of total in report)
How to get percent of total in report [message #754313] Tue, 01 November 2011 23:16 Go to next message
Kevin Williams is currently offline Kevin Williams
Messages: 5
Registered: October 2011
Junior Member
I have data (see data set below) that contains the number of issues, by month by priority. My goal is to display on a report the percent of issues in a report. So using the first 4 records, the first data point is:
January:
Level 1: (154/(154+1166+863+65))*100
Level 2: (1166/(154+1166+863+65))*100
Level 3: (863/(154+1166+863+65))*100
Level 4: (65/(154+1166+863+65))*100

I can do the graph, and using the optional group by y category, I select priority, so I can see the count by month with 4 lines. Instead of the count, I want to show the percentages. I'm at a loss for how I would calculate the percentage however (grouped by y total for the month /non grouped by y total for the month).

Any points on how to create this?

Here's the data set I have:
         count | year | MonthDesc     | Month | Priority  
           154 | 2011 | Jan           |     1 | Level 1
          1166 | 2011 | Jan           |     1 | Level 2
           863 | 2011 | Jan           |     1 | Level 3
            65 | 2011 | Jan           |     1 | Level 4
           214 | 2011 | Feb           |     2 | Level 1
          1112 | 2011 | Feb           |     2 | Level 2
           936 | 2011 | Feb           |     2 | Level 3
            57 | 2011 | Feb           |     2 | Level 4
           158 | 2011 | Mar           |     3 | Level 1
          1361 | 2011 | Mar           |     3 | Level 2
          1055 | 2011 | Mar           |     3 | Level 3
            25 | 2011 | Mar           |     3 | Level 4
            74 | 2011 | Apr           |     4 | Level 1
          1073 | 2011 | Apr           |     4 | Level 2
           924 | 2011 | Apr           |     4 | Level 3
            30 | 2011 | Apr           |     4 | Level 4
            65 | 2011 | May           |     5 | Level 1
          1032 | 2011 | May           |     5 | Level 2
           913 | 2011 | May           |     5 | Level 3
            18 | 2011 | May           |     5 | Level 4
           101 | 2011 | Jun           |     6 | Level 1
          1029 | 2011 | Jun           |     6 | Level 2
          1043 | 2011 | Jun           |     6 | Level 3
            12 | 2011 | Jun           |     6 | Level 4
            89 | 2011 | Jul           |     7 | Level 1
           970 | 2011 | Jul           |     7 | Level 2
           873 | 2011 | Jul           |     7 | Level 3
            11 | 2011 | Jul           |     7 | Level 4
            69 | 2011 | Aug           |     8 | Level 1
          1179 | 2011 | Aug           |     8 | Level 2
          1119 | 2011 | Aug           |     8 | Level 3
            30 | 2011 | Aug           |     8 | Level 4
            76 | 2011 | Sep           |     9 | Level 1
          1265 | 2011 | Sep           |     9 | Level 2
          1269 | 2011 | Sep           |     9 | Level 3
            27 | 2011 | Sep           |     9 | Level 4
            83 | 2011 | Oct           |    10 | Level 1
          1103 | 2011 | Oct           |    10 | Level 2
          1133 | 2011 | Oct           |    10 | Level 3
            12 | 2011 | Oct           |    10 | Level 4
Re: How to get percent of total in report [message #754665 is a reply to message #754313] Thu, 03 November 2011 15:35 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1546
Registered: July 2009
Senior Member

So, you want to show all of the months in the same chart, but have each month separated into its 4 values, and you want these values to show as percent of month? Is this correct? Let me know.

Regards,

Michael
http://www.birt-exchange.org


Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: How to get percent of total in report [message #755177 is a reply to message #754313] Mon, 07 November 2011 10:41 Go to previous messageGo to next message
Kevin Williams is currently offline Kevin Williams
Messages: 5
Registered: October 2011
Junior Member
Hey Michael,

Thanks for the response, I appreciate the help! That's correct.

I want to show 4 lines, with each line being a priority. The x axis are months, and the y axis is percent of issues with priority x (one of the 4)/ total issues for the month.

Any pointers on how best to do this would help a lot! Thanks!
Re: How to get percent of total in report [message #755278 is a reply to message #755177] Mon, 07 November 2011 17:02 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Kevin,

I came up with a way to do this in script using the beforeGeneration
script to change all the runtime values. It is attached. I used a flat
file datasource with your data. Change the datasource to point at the file.

Keep in mind that the optional grouping creates 4 runtime series, one
for each priority.

Jason

On 11/7/2011 10:41 AM, Kevin Williams wrote:
> Hey Michael,
>
> Thanks for the response, I appreciate the help! That's correct.
>
> I want to show 4 lines, with each line being a priority. The x axis are
> months, and the y axis is percent of issues with priority x (one of the
> 4)/ total issues for the month.
>
> Any pointers on how best to do this would help a lot! Thanks!
Previous Topic:(no subject)
Next Topic:Table View on Layout Tab
Goto Forum:
  


Current Time: Fri Jul 25 02:56:19 EDT 2014

Powered by FUDForum. Page generated in 0.11300 seconds