我正在尝试通过添加一个额外的列“ Settlement”来改善query done in the past
sudo -Hu logstash /usr/share/logstash/bin/logstash --path.settings=/etc/logstash -f logstash-simple.conf
代码:
A B C D
1 Amount Paid By Beneficiaries Settlement
2 $20,00 James Elizabeth, James, Michael 27.07.2018
3 $4,50 Elizabeth Elizabeth, Michael
4 $6,90 James Michael
现在,我要避免已经确定的值之和-即,所有包含任何值的行(列D“结算”)。换句话说,我只想对D列等于零的行求和。
有什么办法吗?我已经尝试用=QUERY(
{"Paid By"\"Beneficiary"\ "Amount";
TRANSPOSE(SPLIT(JOIN(";";
ARRAY_CONSTRAIN(ArrayFormula(
rept(B2:B&";";LEN(C2:C)-LEN(SUBSTITUTE(C2:C;",";""))+1));
COUNTA(A2:A);1));";")) \
TRANSPOSE(SPLIT(TEXTJOIN(", ";1;C2:C);", ")) \
TRANSPOSE(SPLIT(JOIN(";";
ARRAY_CONSTRAIN(ArrayFormula(
rept(A2:A /
(LEN(C2:C)-LEN(SUBSTITUTE(C2:C;",";""))+1)&";";
LEN(C2:C)-LEN(SUBSTITUTE(C2:C;",";""))+1));
COUNTA(A2:A);1));";"))
};
"select Col1, Col2, sum(Col3) group by Col1, Col2")
,A2:A
和B2:B
替换C2:C
,FILTER(A2:A; D2:D="")
和FILTER(B2:B; D2:D="")
,但没有成功。谢谢!