[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-31。"],[],[],null,["# Display potentially confusing table calculation totals as nulls\n\n\u003e When you have the appropriate [permissions](/looker/docs/admin-panel-users-roles#create_table_calculations) to create table calculations, you can use [shortcut calculations](/looker/docs/table-calculations#quick_calculations), which let you perform common calculations on numeric fields that are in an Explore's data table without the need to use Looker [functions and operators](/looker/docs/functions-and-operators).\n\u003e You can also apply table calculations directly to the values in the **Total** row.\n\nWhy calculations in the Total row may be confusing\n--------------------------------------------------\n\n\nThe examples and discussions on this page are based on an example of an Explore query: **Order Items Count** , **Users Count** , **Order Items per User** , and **Mean Order Items** grouped by **Orders Created Date** with the [**Totals**](/looker/docs/creating-and-editing-explores#displaying_totals) option applied:\n\n\nThe total for the **Order Items per User** is 4.5, which is the expected rounded total of 54,767 (**Order Items Total** ) divided by 12,290 (**Users Count Total**).\n\n\nThe total for the **Mean Order Items** is 54,767, which is the total **Order Items Count** --- 54,767 --- divided by 1, which may not make sense to display to users.\n\n\nAs discussed in the\n[Considerations for using table calculations](/looker/docs/table-calculations#considerations_when_using_table_calculations) section of the [Using table calculations](/looker/docs/table-calculations) documentation page, table calculations calculate totals based on the single **Total** row, not on the values in the data column. The results are clearly understandable for some calculations, like\nthe **Order Items per User** table calculation total.\n\n\nHowever, table calculations that perform aggregations --- for example, calculations\nthat use `percentile` and `median` --- may calculate totals in confusing ways, such as in the **Mean\nOrder Items** total in the example of the Explore.\n\nReplacing a calculation total with a null symbol in the Total row\n-----------------------------------------------------------------\n\n\nIf you have a potentially confusing result in a table calculation total, you\ncan replace one of your totals with a null symbol using the following table calculation expression. You can replace `my_grouping_dim` with your grouping dimension, and `table_calc` with the table calculation for which you wish to display a null in the **Total** row: \n\n```\nif(is_null(my_grouping_dim), null, \u003ctable_calc\u003e)\n```\n\n\nIf the previous expression is applied to the **Mean Order Items** table calculation, the table calculation will display a null symbol for the **Mean Order Items** total in the data table **Total** row: \n\n```\n if(is_null(${orders.created_date}), null, mean(${order_items.count}))\n```\n\n\nThis result looks like the following in the data table:\n\n\nAdditional resources\n--------------------\n\n\nFor additional information regarding troubleshooting totals for measures, see the\n[Why don't my totals match the values in my table?](/looker/docs/best-practices/how-to-troubleshoot-looker-totals) Best Practices page."]]