3 Replies Latest reply on Aug 9, 2012 8:06 PM by Dimitri.B

# Adding Average Reference Line Giving Incorrect Result

Hello, esteemed tableaulites.

I added a reference line but it is giving me incorrect information. What I want is the average for the pane based on number of passing and failing; what tableau is doing is averaging out the passing rates that were calculated from passing and failing numbers.

Below in the circle, i have 2 passing and 4 failing results spread over 4 days.

Pass         Fail          Passing Rate

Day 1          0               1                    0

Day 2          2               0                    100

Day 3          0               2                    0

Day 4          0               1                    0

I should get 33% (2pass out of 6) for the passing rate but i get 25% (averaging out 0, 100, 0, 0).

. Basically I want it to make an average passing rate based on passing and failing instead of an average of average passing rates...

• ###### 1. Re: Adding Average Reference Line Giving Incorrect Result

You can try a custom calculation just for your average passing rate, which you can add to Level of Detail shelf and then use in reference lines.

The formula should be something like:

SUM(Pass)/(SUM(Pass)+SUM(Fail))

• ###### 2. Re: Adding Average Reference Line Giving Incorrect Result

Hello Dimitri. Thanks for the reply. Actually the problem is i'm getting an average of the averages; even if i used that calculation, I would have to chose from the following drop down:

And for my passing rate percentage, the

SUM(Pass)/(SUM(Pass)+SUM(Fail))

is the calculation that I am using

the actual

• ###### 3. Re: Adding Average Reference Line Giving Incorrect Result

Does the AVG produce incorrect values?

Can you post a sample workbook? There might be a better way, i.e. table calculations.