KNOWLEDGE BASE

Unable to Add a Discrete Field to the Measure Values Card


Published: 18 Jul 2018
Last Modified Date: 18 Jul 2018

Issue

Unable to add a discrete field to the measure values card.

Environment

Tableau Desktop

Resolution

Option 1: Convert the field to a continuous measure

  1. Right click the field in the data pane and, if available, select "Convert to Measure".
  2. Optional: Right click the field in the data pane again and change the aggregation of the field (Default Properties > Aggregation > (Desired Aggregation).
  3. Drag this field on the Measure Values Card.
This option may not work for all use cases. For example, if you want to display a String in the column, see Option 2.

Option 2: Use container fields

Step 1: Create calculated fields for each measure used

  1. For every measure that you want to include in the view, select Analysis > Create Calculated Field.
  2. Name the field. Consider including the name of the measure in it. For example, Order Col.
  3. In the Formula field, type 0, and then click OK.

Step 2: Build the view

  1. Drag Region, Order Date, and Row ID to Rows.
  2. Drag Segment to Columns.
  3. Drag each calculated field that you have created to Columns.
  4. In the ALL Mark card, ensure the Text is selected as a Mark Type.
  5. In each mark card, drag the associated string value or measure to Text. For example, drag Order ID to Text in the SUM(Order Col) mark card.
    Note: if there is more than one string value per line this step will cause overlapping values.
  6. Right-click each measure on the axis and select Edit Axis
  7. Navigate to the Tick Marks tab > select None for Major tick marks and Minor tick marks, and then click OK.
  8. In the Rows, right-click any of the calculated field and select Format. 
    1. Click the Lines icon and navigate to the Columns tab. 
    2. In the Zero Lines drop-down menu, select None.
    3. In the Grid Lines drop-down menu, select None.

Step 3: (Optional): move titles to the top

  1. For each desired column in the finished crosstab, drag two copies of the calculated fields created in the directions above to Columns.
  2. Drag the measure to Text in both copies of the calculated field.
  3. Right-click on the second copy of the calculated field on the Columns shelf and select Dual Axis.
  4. Edit both the top and bottom axes as desired.

Cause

Only aggregated and continuous fields can be added to the Measure Values Card.
Did this article resolve the issue?