Google表:使用多种条件的平均百分比

发布于 2025-02-08 20:36:04 字数 831 浏览 2 评论 0原文

我想从样本中获得平均百分比,但是,我需要使用几种条件。我尝试使用平均filter一起使用,但一切都返回错误,我认为我错误地“合并”了公式。

您可以找到

我需要应用的规则:

  1. 单个行的分数可以在单元格中的“数据”表中找到,并且总结果应在“计算”单元格中可见
  2. 。我需要滤除几片信息并添加条件:
  • 要滤除代码/ID以0:data!a:a&“”,“^0。+”
  • to to to to code/id启动的所有项目滤除与计算表中日期匹配的所有项目:data!c:c = $ b3
  • ,以过滤所有具有特定名称的项目:data!b:b = $ a3 <$ a3 < /code>

有什么想法如何通过特定过滤器获取普通%?


更新

预期结果:我想看到特定日期,名称和ID的总平均值,并说我会使用这些过滤器,然后我只会看到最终的平均百分比。

  1. 测试= 100%
  2. 测试= 0%
  3. test = 100%

总平均%: 66.7%

,我认为最好的方法是使用平均值,但是我会收到错误大小不同”。

=AVERAGEIFS(Data!N:N,Data!B:B=$A3,Data!C:C=$B3,Data!A:A&"", "^0.+")

I would like to get an average percentage out of my sample, however, I need to use several conditions. I tried to use the AVERAGE and AVERAGEIF together with FILTER but everything returns an error and I think I'm incorrectly "merging" formulas.

You can find my test sheet here.

The rules I need to apply:

  1. The score for individual rows is possible to find in the "Data" sheet in cell N and the total results should be visible in the sheet "Calculation" cell E.
  2. As the sample is huge in real life, I need to filter out several pieces of information and add conditions:
  • to filter out all items where the code/ID starts with 0: Data!A:A&"", "^0.+"
  • to filter out all items that are matching the date in the Calculation sheet: Data!C:C=$B3
  • to filter all items with the specific name: Data!B:B=$A3

Any idea how to get the average % out of items with specific filters?


UPDATE

Expected results: I want to see the total average for a specific date, name, and ID, and let's say I would use these filters, then I would see only the final average percentage.

  1. Test =100%
  2. Test = 0%
  3. Test = 100%

Total Average %: 66.7%

Also, I think the best way would be to use AVERAGEIFS, but I'm getting the error "Array arguments to AVERAGEIFS are of different size".

=AVERAGEIFS(Data!N:N,Data!B:B=$A3,Data!C:C=$B3,Data!A:A&"", "^0.+")

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忘你却要生生世世 2025-02-15 20:36:04
=IFERROR(AVERAGEIFS(Data!N3:N,Data!B3:B,A3,Data!C3:C,B3,ARRAYFORMULA(if(LEN(Data!A3:A),REGEXMATCH(Data!A3:A,"^0.+"),"")),TRUE),"")

=IFERROR(AVERAGE(FILTER(Data!N3:N,Data!B3:B=A3,Data!C3:C=B3,REGEXMATCH(Data!A3:A,"^0.+"))),"")

”输入映像在此处“

=IFERROR(INDEX(QUERY({Data!A3:C,Data!N3:N},"select avg(Col4) where Col1 starts with '0' and Col2 = '"&A3&"' and Col3 = '"&B3&"'"),2,0),"")

”在此处输入图像描述”

=IFERROR(AVERAGEIFS(Data!N3:N,Data!B3:B,A3,Data!C3:C,B3,ARRAYFORMULA(if(LEN(Data!A3:A),REGEXMATCH(Data!A3:A,"^0.+"),"")),TRUE),"")

enter image description here

or

=IFERROR(AVERAGE(FILTER(Data!N3:N,Data!B3:B=A3,Data!C3:C=B3,REGEXMATCH(Data!A3:A,"^0.+"))),"")

enter image description here

or

=IFERROR(INDEX(QUERY({Data!A3:C,Data!N3:N},"select avg(Col4) where Col1 starts with '0' and Col2 = '"&A3&"' and Col3 = '"&B3&"'"),2,0),"")

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文