2 Replies Latest reply on Aug 9, 2017 2:48 PM by Kevin Thorson

# How to display % of total when the components are more than 100%

Here is an example of what I'm trying to do:

In January there were 4 people who drank and 100% of them drank beer, 50% drank wine, 25% drank Vodka, and 25% drank rum.  In February 3 people drank and 67% drank beer and vodka while 33% drank wine.  I want to create a line graph that has the % of people that consumed Beer, wine, vodka, and rum each month.  The challenge I'm running into is that a table calculation (Percent of total, calculated Table (down)) takes a percentage of the total drinks not the percentage of people who consumed each beverage.

 Name Month Beer Wine Vodka Rum Joe Jan X X Bill Jan X X Mary Jan X X Sue Jan X X Mike Feb X Henry Feb X Karen Feb X X X
• ###### 1. Re: How to display % of total when the components are more than 100%

There are a number of options, but it depends on the format of your data and how exactly you're trying to graph this. If each of these are actual columns, you could use something like:
SUM(IF [Beer] = 'X' THEN 1 ELSE 0 END) / SUM([Number of Records])

This should give you a 1 for each type of alcohol consumed in the month divided by a 1 for every row within the month, which (theoretically) is all people. Does that help?

• ###### 2. Re: How to display % of total when the components are more than 100%

Wow, I was WAY over-complicating this.  That will do the trick.  Thanks!