我正在尝试编写一个带有某些过滤器的COUNTA()公式。但是,该公式并没有给我我期望的结果。如果我将原始数据放在数据透视表中,则结果如下所示:
但是,如果我尝试使用counta()复制它,所有结果将显示为1:
这是我正在使用的公式:
=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
我很乐意为此提供任何帮助。让我知道是否需要添加更多详细信息。
我用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,"")))))