Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sorting 我如何按百分比和可能的总数对这些数据进行排名?_Sorting_Charts_Google Sheets_Statistics - Fatal编程技术网

Sorting 我如何按百分比和可能的总数对这些数据进行排名?

Sorting 我如何按百分比和可能的总数对这些数据进行排名?,sorting,charts,google-sheets,statistics,Sorting,Charts,Google Sheets,Statistics,在Excel中给定此集合: Group Enrolled Eligible Percent A 0 76 0% B 10 92 11% C 0 38 0% D 2 50 4% E 0 111 0% F 4

在Excel中给定此集合:

Group   Enrolled    Eligible    Percent
A       0           76          0%
B       10          92          11%
C       0           38          0%
D       2           50          4%
E       0           111         0%
F       4           86          5%
G       3           97          3%
H       4           178         2%
I       2           77          3%
J       0           64          0%
K       0           37          0%
L       11          54          20%
是否有一种排序(用于图表)的方法来实现以下顺序

Group   Enrolled    Eligible    Percent
L       11          54          20%
B       10          92          11%
F       4           86          5%
D       2           50          4%
G       3           97          3%
I       2           77          3%
H       4           178         2%
K       0           37          0%
C       0           38          0%
J       0           64          0%
A       0           76          0%
E       0           111         0%
我的目标是使用以下标准进行排名/可视化:

  • 百分比
    desc(当
    登记>0时
  • 合格
    asc(当
    登记=0时
  • 写下这个问题后,答案看起来很明显:按
    百分比
    降序排序,然后按
    合格
    升序排序(当
    百分比或注册=0时)。但我觉得我缺少了一个明显的方法/术语来实现我所期待的结果


    谢谢。

    使用谷歌电子表格查询是最简单的方法。目标1:

    =QUERY(A1:D13,"Select A,B,C,D Where B>0 Order By D desc,1") 
    
    目标2:

    =QUERY(A1:D13,"Select A,B,C,D Where B=0 Order By C ,1")
    

    你缺少的术语是

    以下是您正在寻找的公式:

    =SORT(A1:D13,4,0,3,1)
    
    注意

    数字应格式化为数字

    请注意,此功能在其他劣质电子表格解决方案(如Microsoft excel)中不可用,这将需要基于死板语言(如vba)的复杂解决方案。