1 Reply Latest reply on Feb 7, 2013 4:16 AM by Jim Wahl

    How can I display averages for multiple time frames (last day, last week, last month) on the same bullet chart?

    Marcus Kwan

      I have a table of with dimensions of user and date, with measures of duration.  I am trying to create a single graph that does the following

      1. shows each users average duration for the last day, week, and month

      2. overlays a reference line with average for all users and all days

       

      I am willing to us side by side bar charts, but would prefer bullet chart.  Any thoughts?

        • 1. Re: How can I display averages for multiple time frames (last day, last week, last month) on the same bullet chart?
          Jim Wahl

          Hi Marcus,

           

          I'm not quite clear on your goal. When I think of a bullet chart, it has a measure (the bar) a target value (the marker crossing the bar) and maybe the background is shaded to provide qualitative ranges (good , bad, ...).

           

          But maybe the attached example will get you close to what you want. I created calculated fields for the sales over the last month, last quarter, and last six months. The last month is easy:

          IF LAST()=0 THEN

              SUM([Sales])

          END

           

          The last quarter and six months use a window_sum (in your case, maybe this is window_avg):

          IF LAST()=0 THEN

              WINDOW_SUM(SUM([Sales]), -2, 0)  //replace -2 with -5 or last six months

          END

           

          Now you have three measures, and you can plot these as "markers" using a gantt chart and color them by adding the measure names to the color shelf. You can add a bar by dragging say the sales measure to the columns shelf, selecting dual axis, synchronizing axis, adjust the size of the bar to create the bullet chart effect.

           

          Hope this helps. If not, many you can post an example tableau packaged workbook. ...

           

          Jim