跳到主要内容

如何在Excel数据透视表中计算中位数?

例如,您已创建一个数据透视表来统计饮料的销售量,如下图所示。 现在,您要将每种饮料的中位数添加到数据透视表中,知道吗? 本文将为您介绍一个解决方案。

计算Excel数据透视表中的中位数


计算Excel数据透视表中的中位数

此方法将指导您在源数据中添加有关中位数的帮助列,然后将中位数字段轻松添加到数据透视表中。

1。 在源数据旁边插入一个空白列,键入 中位数 作为列名,输入公式 =MEDIAN(IF($B$2:$B$31=B2,$C$2:$C$31)) 进入“中位数”列的第一个单元格,然后按 按Ctrl + 转移 + 输入 键,最后拖动自动填充手柄以填充整个列。 看截图:

2。 选择数据透视表中的任何单元格以激活 数据透视表工具,然后单击 分析 (或 附加选项)> 变更资料来源 > 变更资料来源。 看截图:

3。 在“更改数据透视表数据源”对话框中,在 表/范围 框,然后单击 OK 按钮。 看截图:

4。 现在 中位数 文件已添加到 数据透视表字段 窗格,请拖动 中位数 领域 价值观 部分。 看截图:

5。 在 价值观 部分,请点击 中位数 字段,然后选择 值字段设置 在下拉列表中。 看截图:

6。 在“值字段设置”对话框中,选择 一般 ,在 汇总值字段 在下面列出 汇总值 选项卡,将字段名称重命名为  中位数 (中位数前有空格) 自定义名称 框,然后单击 OK 按钮。 看截图:

现在,您将看到每行标签的中位数已添加到数据透视表中。 看截图:


相关文章:

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (6)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Great way to quickly solve it! Thank you so much!!!
Rated 5 out of 5
This comment was minimized by the moderator on the site
HOLA ME SALE #NA, QUE PUEDO HACER
This comment was minimized by the moderator on the site
Sugiro que o próximo tutorial seja sobre a diferença ente média (average) e mediana (median).Sugiro que o autor deste tutorial veja o tutorial que referi acima.
This comment was minimized by the moderator on the site
? you just renamed the column estupido
This comment was minimized by the moderator on the site
Thank you for the tip. Very clear concept - a matrix in each cell. Brillhant.
This comment was minimized by the moderator on the site
HI there!

Thanks for the great tips and ideas. really helpful!
in this line

"1. Insert a blank column beside the source data, type Median as column name, enter the formula =MEDIAN(IF($B$2:$B$31=B2,$C$2:$C$31)) into the first cell of the Median column, and press Ctrl + Shift + End keys together, and finally drag the AutoFill Handle to fill the whole column. See screenshot:"

...didn't you mean Ctrl+Shift+Enter?


thanks again,
Joe
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations