1 Reply Latest reply on Jan 5, 2013 6:15 AM by Shawn Wallwork

# Weighted YTD Average Percentages

Hi there - my apologies in advance if my question / situation has been addressed in a previous posting.

I'm a newbie to Tableau Desktop, and am creating a number of worksheets.  On one of them, I'm trying to show a running total of a subsegment and the total population for each month along with the subsegment's percentage of the total population - screenshot below.

The % Population Segment field has been calculated by taking a Sum of the records matching the population segment criteria (a Booelan), and dividing it by a Count of the Number of Records.  This calculation works beautifully for each individual month; now I'm tryingi to figure how how to show this percentage on a weighted YTD basis for each month.  I created a Moving Average table calculation on this field, moving across the table and against the previous 12 values.  Things look good from Jan to April; then the moving average % starts to differ from the actual Population Segment/Population Total quotient.   For example - in June dividing 1696 by 1816 results in 93.39% - yet my Moving Average calculation comes to 93.19%.

Any suggestions on what I should do to show the correct % Population Segment?

Thanks!

• ###### 1. Re: Weighted YTD Average Percentages

Alexander, you'll need to post a packaged workbook with sample data for us to help you figure out what's going on.

--Shawn