8 Replies Latest reply on Jan 15, 2014 12:50 PM by KK Molugu

# Cumulative distribution giving impossibly high percentages

I have been trying to create a cumulative distribution from my data but keep getting sums of around 800%.

Here is the histogram of my data, perfectly normal and as expected:

But when I add this table calculation:

I get this:

Which looks like a great curve but the scale is completely wrong.

I can't possibly imagine why it's doing this. I've tried calculating by every other option, and entering in custom calculations and everything but it doesn't change.

Thoughts?

I have attached a similar sample using the superstore data.

• ###### 1. Re: Cumulative distribution giving impossibly high percentages

Renee:

Can you attach the workbook to see what's going on in there. May be a sample data.

..kk

• ###### 2. Re: Cumulative distribution giving impossibly high percentages

I have attached a sample based on the superstore data in the original post.

• ###### 3. Re: Cumulative distribution giving impossibly high percentages

In case it helps, I found this from 2010, but it was still unanswered. It seems like it's the same problem.

Re: Count distinct as a percentage of total - across: inaccurate percentages displayed

• ###### 4. Re: Cumulative distribution giving impossibly high percentages

Renee:

Don't know if this is the right way to fix the issue we have with the COUNTD problem, but I found a workaround to solve this. Tableau experts can verify this. Attached workbook had couple sheets (Bad One) and (Workaround).

- Running Total of the COUNTD looks fine (2nd mark)

- When the Percent On Total calculation was done on (3rd Mark), it looks like the values are more than what they should be. When Percent of Total is calculated, it is computing CNTD(Item) at the bin level/CNTD(Item) instead it is using CNTD(Item) at the bin level/Total CNTD items.

- With that when the cumulative sum (4th mark) is done the total is > 100%

For ex. bin (-2000) should have been  1065/2958 ~ 36%, but instead it is doing 1065/1263 ~ 84.32%. 1263 is the CNTD(Item).

Workaround:

What I have done is here is on the cumulative sum (4th mark), instead of using the Percent of Total on the secondary type, I have used the Percent From option and selected Last option for 'Display the value as a percentage of'. What this does is it will compute the values based on the last value which is 100%.

Hope this helps for the time being.

..kk

• ###### 5. Re: Cumulative distribution giving impossibly high percentages

Wonderful! Works perfectly. Thank you

• ###### 6. Re: Cumulative distribution giving impossibly high percentages

Hello, back again. The original solution worked well because it was a running total, but trying to display the % of total COUNTD in a table gives the same problem. Any ideas for a workaround for this?
For example, in the sample workbook we're using:

So, just a % of total it will still not work. Any ideas?

• ###### 7. Re: Cumulative distribution giving impossibly high percentages

Renee:

That was the main issue that was messing up the cumulative values. If you look at the workaround sheet from my earlier attachment, 3rd mark has the % of total which was not right. Adding them was giving > 100%. I can look at this later tonight.

..kk

• ###### 8. Re: Re: Cumulative distribution giving impossibly high percentages

Renee:

Hope this works. Create a new calculate field using the formula and drop this marks pane.

COUNTD([Item]) / window_sum(COUNTD([Item]))

..kk

1 of 1 people found this helpful