Wednesday, 8 June 2016

Adding dynamic reference line for each separate member in a dimension



Step 1: Create the parameters

  1. Right-click in the Data pane and then select Create Parameter.
  2. In the Create Parameter dialog box, name the parameter "Furniture Goal".
  3. Under Data Type select Integer.
  4. Under Allowable values select All.
  5. Click OK.
  6. Right-click the parameter and then select Show Parameter Control.
  7. Complete Steps 1 through 6 for a parameter named "Office Supplies Goal".
  8. Complete Steps 1 through 6 for a parameter named "Technology Goal".

Step 32 Create the calculated field

  1. Select Analysis > Create Calculated Field.
  2. In the Create Calculated Field dialog box, name the field "Reference Line".
  3. In the formula field, enter the following formula:
CASE MIN([Department])
WHEN 'Furniture' THEN MIN([Furniture Goal])
WHEN 'Office Supplies' THEN MIN([Office Supplies Goal])
WHEN 'Technology' THEN MIN([Technology Goal])
END
  1. Click OK.


http://kb.tableau.com/articles/howto/adding-separate-dynamic-reference-lines-for-each-dimension-member