Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulative Percentage in Straight Table

Hi,

I need to get the cumulative percentage of the Module Assigned / Module Assigned (Completed) on a weekly basis. Something like I need to get the percentage of each row.

WeekEndModule AssignedCompleted% Completion
6/19/20153133.33%
6/26/2015274 (271+3)11441.61%
9/25/2015280 (274+6)11942.50%
10/30/201528212042.55%
11/6/201529012342.41%
11/13/201534412736.91%

Here's my expression for the Module Assigned and Completed (both in Full Accumulation already)

Module Assigned = count(Training)

Completed = count({$<Status = {'Completed'}>} Training)

1 Solution

Accepted Solutions
effinty2112
Master
Master

Hi Edward,

I took your data and worked back to this table of non accumulated figures

   

WeekEndModule AssignedCompleted
6/19/201531
6/26/2015271113
9/25/201565
10/30/201521
11/06/201583
11/13/2015544

You can make a straight table with the Weekend as dimension, all other columns are expressions. Instead of using the accumulation feature of the straight table use instead the expressions here to calculate the accumulation then the last column is the ratio of the preceding two expressed as a percentage.

WeekEnd Module Assigned Completed RangeSum(Above([Module Assigned],0,RowNo())) RangeSum(Above(Completed,0,RowNo())) RangeSum(Above(Completed,0,RowNo())) / RangeSum(Above([Module Assigned],0,RowNo()))
 
6/19/2015313133.33%
6/26/201527111327411441.61%
9/25/20156528011942.50%
10/30/20152128212042.55%
11/06/20158329012342.41%
11/13/201554434412736.92%

hope this helps!

View solution in original post

11 Replies
sinanozdemir
Specialist III
Specialist III

You can use the below expression:

Count({$<Status = {'Completed'}>} Training)/Count(Training)


Capture.PNG

Hope this helps.

Not applicable
Author

Hi Sinan,

I tried actually that expression but I'm not getting the correct results.

Cumulative Percentage.png

sinanozdemir
Specialist III
Specialist III

Do you think you can post a sample qvw or your expression?

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi Edward,

For %Cumulative you can also  use below exp:

=Column(1) /Column(2)

Regards,

Nagarjuna

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

can you share sample data and your expected out put .

Regards,

Nagarjuna

Not applicable
Author

Hi Nagarjuna / Sinan,

Please see attached qvw file.

Data is under the Compass Training table.

Actually the data has no numerical data involved..Just the count of all the training I assigned per day and I want it actually to be grouped per week. Not sure how to do that in script.

Thanks,

effinty2112
Master
Master

Hi,

I'm not sure what a cumulative percentage means. The only sensible definition I can think of is the percentage ratio of two cumulative totals and that is what you have.

If I've misunderstood you I apologise.

Kind regards

Not applicable
Author

Hi Andrew,

Sorry if my question wasn't clear enough. But what I need to have is the percentage of each row.

This is the Actual Count each week.

Cumulative Percentage1.png

This is the Full Accumulation

Cumulative Percentage.png

What I need to get is the percentage of each row. So for example, I should be getting 42.70% (120 / 281) for 9/25/2015, 42.75% (121 / 283).

Hope that makes sense.

effinty2112
Master
Master

Hi Edward,

I took your data and worked back to this table of non accumulated figures

   

WeekEndModule AssignedCompleted
6/19/201531
6/26/2015271113
9/25/201565
10/30/201521
11/06/201583
11/13/2015544

You can make a straight table with the Weekend as dimension, all other columns are expressions. Instead of using the accumulation feature of the straight table use instead the expressions here to calculate the accumulation then the last column is the ratio of the preceding two expressed as a percentage.

WeekEnd Module Assigned Completed RangeSum(Above([Module Assigned],0,RowNo())) RangeSum(Above(Completed,0,RowNo())) RangeSum(Above(Completed,0,RowNo())) / RangeSum(Above([Module Assigned],0,RowNo()))
 
6/19/2015313133.33%
6/26/201527111327411441.61%
9/25/20156528011942.50%
10/30/20152128212042.55%
11/06/20158329012342.41%
11/13/201554434412736.92%

hope this helps!