Last Modified Date: 09 Mar 2017
AnswerUsing calculated fields, you can create conditional data labels based on a custom field that includes only the values of interest. This article shows how to create a conditional label that appears on a mark only when a region’s sales for a day are greater than $60,000.
Step 1: Create a calculated field
- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box:
- Name the calculated field. In the example workbook, the calculated field is named "Outlier".
- In the formula field, create a calculated field similar to the following:
IF SUM([Sales])> 60000 THEN SUM([Sales]) ELSE null END
- Click OK.
Step 2: Build the view
- From the Measures pane, drag Sales to the Rows shelf.
- From the Dimensions pane, drag Order Date to the Columns shelf, and then drag Region to Columns.
- Right-click Order Date and select Month (as a discrete field).
- Drag the new calculated field Outliers to the Labels mark card.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials