[tableau]pie chart只标记top5

在Tableau中创建pie chart时,若要仅标记最大的五个部分,可创建一个计算字段并利用RANK函数。将该字段拖到“标签”中,并设置计算依据为相关维度。此外,通过调整图例位置,可使pie chart的显示更加理想。对于剩余的小部分,可以创建集合将它们合并为一个单独的切片。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://community.tableau.com/thread/211365

画一个pie chart然后做标记的时候,只希望标记前5个时:

create calculated field:(top5)
IF RANK(SUM(factor)) <= 5 THEN ATTR([p_lodging]) END

然后把它拖进“label”那里,
右击 -> “computing using" -> p_lodging

在这里插入图片描述


调整pie chart 上面的位置,
只需要把凡例那里的位置上下的移动,pie chart 上面的位置也会移动,神奇。
在这里插入图片描述


画一个pie chart,第6块开始把小的都合并起来。
https://kb.tableau.com/articles/howto/creating-a-pie-chart-with-individual-slices-for-top-n-and-single-slice-for-other-values

The below instructions use Sample - Superstore data to show the top 5 states by profit in a pie chart.
Right-click State and select Create > Set
Name the set Top States by Profit.
Select the following options, then click OK:
Top
By Field
Top 5 by Sales Sum
Select Analysis > Create Calculated Field.
Name the field Top and Other.
Enter the following formula, then click OK:
IF [Top States by Profit] then [State] ELSE ‘Other’ END
Select Pie on the Marks card.
Place SUM(Sales) on Angle.
Place Top and Other on Color.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值