Posted 3 August 2017, 3:21 pm EST
Hi Friends, I was just wondering how we can compute the Relative Cumulative Frequency within the table for given initial value.Computing Relative Cumulative Frequency
Posted by: atalati on 3 August 2017, 3:21 pm EST


Replied 3 August 2017, 3:21 pm EST
Hi ATalati,
I'm not sure what you mean by "given initial value" however you can compute it by the use of grouping and sorting of the groups.
In the attached sample and my steps below I am using the data at this page:
http://www.learner.org/courses/learningmath/data/session3/part_b/index.html
to compute the relative cumulative frequency, which will produce the table on this page:
http://www.learner.org/courses/learningmath/data/session3/part_c/relative.html
First we'll add a table to our report, we're not interested in displaying each row of data so we'll use detail grouping to set up the intervals. If you did want to show each row of data but only display the Relative Cumulative Frequency (RCF) in the group header or footer you can still do that, just add a regular group and use the same grouping expression.
To setup detail grouping, click on one of the table cells to select the cell and then click the upper left corner of the table to select the table. In the property grid click the "Open Wizard" link. Go to the Detail Grouping page, under Expression enter the following expression:
=[FieldValue] \ 10
The \ operator performs integer division, so this will give us the digit in the tens place.
Now click at the top of the window, click the icon that shows blue and orange arrows, to go to the Sorting page. In the first cell enter the expression:
=[FieldValue]
This will sort our data by the value so the buckets come out in the order we're expecting them.
Now we can get down to calculating the frequencies. To do this we need to Count how many items are in each bucket, as well as all previous buckets...Fortunately, we have the Count aggregate to do this. And, we can make use of the RunningValue aggregate to do a running tally of how many items are in the buckets.
To get the number of items in the current bucket you can use the following expression if you want to output that:
=Count([FieldValue])
To calculate the Cumulative frequency we can use the following expression:
=RunningValue([FieldValue], Count)
And to get how many items there are, we can use the Count expression but specify a scope:
=Count([FieldValue], "DataSet1")
Now you can put these together in various ways to create our table.
To generate the [cumulative]/[total] use the following expression:
=RunningValue([FieldValue], Count).ToString() & "/" & Count([FieldValue], "DataSet1").ToString()
To generate the decimal value use the following expression and set the format to N3:
=RunningValue([FieldValue], Count) / Count([FieldValue], "DataSet1")
And to display the percentage, we use the same expression but set the Format to P1.
I hope that helps :)
James
2012/07/RelativeCummulativeFrequencies.rdlx

Replied 3 August 2017, 3:21 pm EST
Hi James,
Thanks for your help, but in my understanding, Relative Cumulative Frequency looks something as below ...
http://www.ditutor.com/statistics/relative_cumulative.html 
Replied 3 August 2017, 3:21 pm EST
Hi ATalati,
The concept is the same; i've attached my same sample as before only i've made two structural changes to it.
1) Since the buckets are now just each individual value I changed the group expression to =[FieldValue]
2) I changed the data to use what is on that page.
All of the structure is the same as before, with just a few minor cosmetic changes made.
a) Colors altered to match what is in the table.
b) Added a frequency column (=Count([FieldValue])) to match the page's table.
I hope that helps,
James
2012/07/RelativeCummulativeFrequenciesB.rdlx