知识库

Showing Text Mark Type for Grand Total and Other Chart for Measures


发布时间: 13 Jun 2017
上次修改日期: 20 Jul 2023

问题

In a view that contains multiple measure values and a grant total formatted as a horizontal bar chart, how to remove the bar chart for the grant total so that only the label appears while the rest of the view keeps the horizontal bar chart.

环境

  • Tableau Desktop

答案

The following resolution applies to the attached example workbook NoMarkTypeTotals.twbx. Please note that such steps will need to be adjusted for certain views that place measure on rows shelf or contain more than a single dimension. For example, the table calculation would need to be computed differently depending on the table layout.

For each measure appearing in the view as a grand total: 

  1. Create a new calculated field similar to the following examples:
    IF SIZE()= 1 THEN 0 ELSE SUM([Sales]) END
    
    Or
    IF SIZE()= 1 THEN 0 ELSE SUM([Quantity]) END
    
    Or
    IF SIZE()= 1 THEN 0 ELSE SUM([Profit]) END
    
  2. Drag these new calculated field to the Columns shelf to replace the existing measures.
  3. Right click them and select Compute Using > Table (down).
  4. For each new measure's Marks card, add the original measure to Label.
此文章是否已解决问题?