Last Modified Date: 20 Nov 2019
Environment
Tableau DesktopResolution
Replace measure with calculated field that sets the value to NULL for specified rows. This example uses Superstore sample data to exclude sales for the rows defined by Central Bookcases and Central Labels. More rows can be defined by adding additional OR statements.- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box that opens, do the following, and then click OK:
- Name the calculated field. In this example, the calculated field is named Sales excluding rows.
- In the formula field, create a calculated field similar to the following:
IF [Region] = "Central" AND [Category] = "Bookcases"
OR [Region] = "Central" AND [Category] = "Labels"
THEN NULL
ELSE [Sales]
END - Replace [Sales] with [Sales excluding rows] in the view
Additional Information
Note: setting a value to NULL will exclude the value from all table calculations, such as totals.Discuss this article... Feedback Forum
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials