根据应该隐藏哪些合计,解决方案会有所不同。本文右侧窗格中的工作簿使用示例数据集 Superstore 来演示以下所有解决方案。
所有解决方案都从“原始”工作表开始。用于创建“原始”工作表的指导位于工作簿中。
IF MIN([Segment]) != MAX([Segment]) //TRUE for all total rows for segment or higher in the view hierarchy AND MIN([Sub-Category]) = MAX([Sub-Category]) //TRUE for all rows in view except totals for sub-category or higher in the view hierarchy AND MIN([Sub-Category]) IN ('Bookcases','Appliances') //list subtotals to hide THEN NULL ELSEIF MIN([Sub-Category]) != MAX([Sub-Category]) AND MIN([Category]) = MAX([Category]) AND MIN([Category]) = 'Furniture' THEN NULL ELSE SUM([Sales]) END
IF MIN([Segment]) != MAX([Segment])
AND MIN([Sub-Category]) = MAX([Sub-Category])
AND MIN([Sub-Category]) IN ('Bookcases','Appliances')
THEN NULL
ELSEIF MIN([Sub-Category]) != MAX([Sub-Category])
AND MIN([Category]) = MAX([Category])
AND MIN([Category]) = 'Furniture'
THEN NULL
ELSE SUM([Profit])
END
001466835
1540 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.