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

% of Total in column Pivot-table

Hi!

I hope someone can help me with an expression to calcuate sum of total in % in a pivot-table.

I have a pivot table with 2 dimensions:

Dimension 1: Customer

Dimension 2: Status

Expression 1: COUNT(Status)

Expression 2 ?  (here I want an expression that shows the total of Status per customer as a % of all Status)

The attached excel-file is showing what I want as a result.  I have no problem with showing the total  number of status per customer, but I am not able to show it in percent too.  I suppose I need an expression for this %.

I guess the solution is simple, but I have problem with finding thit.e correct solution.

Best regards

Torunn

1 Solution

Accepted Solutions
Not applicable
Author

You can use the TOTAL qualifer of the Count aggregation function.  So something like this:

count(total<Customer> Status) / count(total Status)

... will give you the Status count by Customer / Status count for all Customers

View solution in original post

4 Replies
Not applicable
Author

You can use the TOTAL qualifer of the Count aggregation function.  So something like this:

count(total<Customer> Status) / count(total Status)

... will give you the Status count by Customer / Status count for all Customers

Anonymous
Not applicable
Author

Hi Donald!

Thank's for your help!  I do now have the percent, but  I have an additional question.

I do now get a percent for each status but I only want to show the total in percent for each customer ( only one column far right).  How can I remove the % for each status?  I want to show the number of each status, but percent only for the customer.

Regards

Torunn

Not applicable
Author

I'm not sure how you'd suppress the visibility of the expression except for the total, given there is really just one level of dimensionality.  Perhaps someone can chime in if there is a way, but it doesn't occur to me.

If your Status values are predictable and static (Failed, Network Error, etc.), then you could use a straight table instead (not a pivot), then use simple Set Analysis to build the expressions.  See attached.

Anonymous
Not applicable
Author

Hi again Donald!

I will follow your advice and use a straight table instead.  The status-values are static, so that should not be a problem.

Thank's again for your help!

Best regards

Torunn