1 Reply Latest reply on Oct 30, 2013 11:52 AM by Matt Lutton

    Need Help Calculating an Average

    Josh Pashman

      This should be very simple, but some reason is confounding me.

       

      I need to calculate an Average Age.  I am pulling in from a broad database into Tableau via excel Power Pivot as set up by our database manager.

       

      In Dimensions I have AGE ( the age of each individual discharged from an area hospital.

      In Measures, I take the Count of each hospital to get the volume discharged.

       

      I want to calculate the average age of these discharges that I can then stratify by gender, ethnicity, etc...

       

      I moved AGE into Measures assuming I could then aggregate somehow and/or create a calculated field.  It shows up as "COUNT of AGE" as its Default Aggregation.

       

      Were it excel, I would simply do:

       

      SUM (Product of Each Age *Discharge Volume by Each Age) /  Total Discharge Volume

       

      I even tried something along these lines:  Calculating Weighted Averages | Tableau Software but no success

       

      In Tableau, I tried a similar calculated field to no avail.  Curious anyone has ideas. Thanks!