11 Replies Latest reply: Nov 23, 2015 9:22 AM by Edward Tutanes

# 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)

• ###### Re: Cumulative Percentage in Straight Table

You can use the below expression:

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

Hope this helps.

• ###### Re: Cumulative Percentage in Straight Table

Hi Sinan,

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

• ###### Re: Cumulative Percentage in Straight Table

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

• ###### Re: Cumulative Percentage in Straight Table

can you share sample data and your expected out put .

Regards,

Nagarjuna

• ###### Re: Cumulative Percentage in Straight Table

Hi Edward,

For %Cumulative you can also  use below exp:

=Column(1) /Column(2)

Regards,

Nagarjuna

• ###### Re: Cumulative Percentage in Straight Table

Hi Nagarjuna / Sinan,

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,

• ###### Re: Cumulative Percentage in Straight Table

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

• ###### Re: Cumulative Percentage in Straight Table

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.

This is the Full Accumulation

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.

• ###### Re: Cumulative Percentage in Straight Table

Hi Edward,

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

 WeekEnd Module Assigned Completed 6/19/2015 3 1 6/26/2015 271 113 9/25/2015 6 5 10/30/2015 2 1 11/06/2015 8 3 11/13/2015 54 4

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!

• ###### Re: Cumulative Percentage in Straight Table

I think the problem is here that Module Assigned and Completed columns are expressions with full accumulation. They are not dimensions.

• ###### Re: Cumulative Percentage in Straight Table

Thanks Andrew. I got it now.

This method will work if you have the count function from your script and then group by WeekEnd dimension and store it into QVD. Or from the QVW directly, use the AGGR function since the data was loaded per day. So we need to aggregate all the data into WeekEnd dimension.