2 Replies Latest reply on Jul 30, 2016 8:33 AM by Nick Zhao

    Multiple measures on the same line chart. Only want to show reference line for 1 measure.

    Nick Zhao

      I recently came across a problem where I have to plot multiple measures on the same line chart. But I need to show only an average reference line for only one particular measure.


      In the attached workbook, I use the superstore database to create a test scenario. I know it doesn't make sense to draw things in this way. But for testing purposes, let's say I want to draw profit, sales, quantity on the same pane according to month of order date. I want to show the average reference line for profit. But if I add an average reference line, the average is calculated using all three lines on the pane. Is there anyway to tell Tableau to base the average line solely on profit?


      I am aware that if I only plot two measures, then I can use dual axis to achieve the goal. (seems that reference line is something associated with axis, not measure.) But what if there are some other reasons that prohibit me from using dual axis, e.g., I need to draw 3 measures.


      I am also aware that I can use calculated field to compute average and draw that average line as if I am drawing a constant measure. But this kind of approach has some drawbacks: 1. reference line in this way can not be dashed line; 2. I cannot put a label over the line telling people this is an average line (true, I can annotate, for example, the first mark on the average line. But if that mark gets filtered out by some quick filter controlled by the user, then the annotation would be gone too.)


      Is there any other ways to do it?


      Thanks for your help!