可以按“有效"排序.在我的数据中所占的百分比? [英] It is possible to sort by "valid" percentage in my data?

查看:142
本文介绍了可以按“有效"排序.在我的数据中所占的百分比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Tableau,我已将一些数据排列在100.00%的堆积栏中:

Using Tableau, I have arranged some data in a 100.00% stacked bar:

我想按Valid component type(绿色)对降序排列(最大到最小)的数据进行排序-这是可能吗?

I want to sort the data descending (largest to smallest) by Valid component type (green) - is this possbile?

更新(2017年7月26日)

merawalaid的回答ALMOST起作用了;我按照步骤操作,调整了代码以匹配我的特定项目,结果是这样:

merawalaid's answer ALMOST worked; I followed the steps, adjusted the code to match my specific project, and it resulted in this:

如您所见,它有些排序,但不尽如人意(例如,图表中第四行和第六行的特征太高.

As you can see, it is somewhat sorted, but not quite as it should be (for example, the fourth and sixth rows are featured too high in the chart.

我在这里错过了什么错吗?

Is there something that might be wrong that I have missed here?

推荐答案

我能够做到这一点:

I was able to do this: You can download my workbook here. Be advised though, I feel there would probably be a simpler way out there to do this.

我要做的是创建2个计算字段.

What I did was to create 2 calculated fields.

'ValidComponentCount': IF ([Component Type]='Valid Component') THEN 1 ELSE 0 END

'% of Valid': {FIXED [Rootname] : SUM([validCount])/COUNT([Number of Records])}

然后根据第二个计算字段的降序值(有效百分比)对根名"列进行排序.

Then sorted the 'Rootname' column based on descending value of the 2nd calculated field (% of Valid).

这篇关于可以按“有效"排序.在我的数据中所占的百分比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆