在Google表格查询数据透视表中删除标题行 [英] Removing header row in Google sheets query pivot
问题描述
尽管在Google表格查询功能中删除标题行似乎很简单,但是当查询涉及数据透视时,我看不到任何删除标题行的建议.作为参考,我提供了一个具有电子表格的查看权限的链接复制了我正在使用的结构.
While removing the header row in a Google sheets query function seems straightforward, I don't see any suggestions on removing the header row when the query involves a pivot. For reference, I am giving a link with viewing rights to a spreadsheet which replicates the structure of the one I am working with.
查询在选项卡查询表"的单元格C4中.内容如下:
The query is in cell C4 of the tab "Query sheet" and reads as follows:
= QUERY('Class hours'!A2:C11,"select sum(C) WHERE A='" & A5 & "' group by A pivot B")
目的是删除此工作表中单元格C4:E4中的行标题,以便可以将此功能复制到C列下,以在A列中包含所有名称,并在各行中包含相应的总和(C).感谢您的关注.
The aim is to remove the row headers in cells C4:E4 in this sheet so that this function can be copied down column C to include all names in Column A with corresponding Sum (C) in the rows. Thanks for your attention.
推荐答案
尝试一下:
=QUERY(QUERY('Class hours'!A2:C11,
"select sum(C)
where A = '"&A5&"'
group by A
pivot B"),
"offset 1", 0)
甚至您的情况:
=INDEX(QUERY('Class hours'!A2:C11,
"select sum(C)
where A = '"&A5&"'
group by A
pivot B"), 2)
这篇关于在Google表格查询数据透视表中删除标题行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!