4 Replies Latest reply on Aug 23, 2018 6:59 PM by Ayub Keshtmand

    Multiple reference lines for side-by-side bars

    Ayub Keshtmand

      product: Tableau Desktop

      version: 10.5

      data source: Sample - EU Superstore

      workbook: multiple_reference_lines_for_side_by_side_bars_help.twbx

       

      What I've done:

       

      • I've created the following 4 calculated fields:
        • Sales (First Class) => IF [Ship Mode] = "First Class" THEN [Sales] END
        • Sales (Same Day) => IF [Ship Mode] = "Same Day" THEN [Sales] END
        • Sales (Second Class) => IF [Ship Mode] = "Second Class" THEN [Sales] END
        • Sales (Standard Class) => IF [Ship Mode] = "Standard Class" THEN [Sales] END
      • I've created a side-by-side bar chart (see attached twbx Sheet 1) as follows:

       

      What I would like to do:

      • I would like to drop the remaining calculated fields onto the Detail mark and then create individual separate Reference Lines, one for Sales (First Class) and one for Sales (Second Class)
      • My usual method of drawing up a single reference line is as follows (see attached twbx Sheet 2):

      • For the above, the reference line is Sales (Same Day), but what I would like is in Sheet 1 to have, for example,
        • A Sales (Same Day) reference line against Sales (First Class)
        • A Sales (Standard Class) reference line against Sales (Second Class)

       

      What I've tried to do:

       

      • Place the reference lines twice onto the canvas:

       

      Any help would be greatly appreciated.

      Many thanks in advance.

       

      Ayub