Google表格:Counta(filter())公式未按预期工作

问题描述 投票:0回答:1

我正在尝试编写一个带有某些过滤器的COUNTA()公式。但是,该公式并没有给我我期望的结果。如果我将原始数据放在数据透视表中,则结果如下所示:

enter image description here

但是,如果我尝试使用counta()复制它,所有结果将显示为1:

enter image description here

这是我正在使用的公式:

=ARRAYFORMULA(
IF(ROW($A:$A)=1,"Appointment Fixed",               //gives a label to the first row
IF(ISBLANK($A:$A),"",                              //handles blank values
COUNTA(FILTER('Raw Data'!$F:$F,                    //the data i want to count
'Raw Data'!$E:$E="platinumTravelCreditCard",       //first filter
('Raw Data'!$H:$H="Approve")+('Raw Data'!$H:$H=""),//second filter: this is an either/or filter
'Raw Data'!$F:$F,$A:$A,                            //third filter
'Raw Data'!$S:$S,"Appointment Fixed")))))          //last filter

我很乐意为此提供任何帮助。让我知道是否需要添加更多详细信息。

excel google-sheets google-sheets-formula
1个回答
0
投票

我用countifs公式找出了解决方法:

=ARRAYFORMULA(IF(ROW($A:$A)=1,"Appointment Fixed",IF(ISBLANK($A:$A),"",if(COUNTIFS('Raw Data'!$E:$E,"platinumTravelCreditCard",'Raw Data'!$F:$F,$A:$A,'Raw Data'!$S:$S,"Appointment Fixed",'Raw Data'!$H:$H,"Approve")+COUNTIFS('Raw Data'!E:E,"platinumTravelCreditCard",'Raw Data'!$F:$F,$A:$A,'Raw Data'!$S:$S,"Appointment Fixed",'Raw Data'!$H:$H,"")=0,"",COUNTIFS('Raw Data'!$E:$E,"platinumTravelCreditCard",'Raw Data'!$F:$F,$A:$A,'Raw Data'!$S:$S,"Appointment Fixed",'Raw Data'!$H:$H,"Approve")+COUNTIFS('Raw Data'!E:E,"platinumTravelCreditCard",'Raw Data'!$F:$F,$A:$A,'Raw Data'!$S:$S,"Appointment Fixed",'Raw Data'!$H:$H,"")))))
© www.soinside.com 2019 - 2024. All rights reserved.