48

I have a query like this =QUERY(B2:C9; "select (C * 100 / B) - 100") in my Google Sheets. What is displayed as a column header is:

difference(quotient(product(100.0()))100.0()).

I want to put a human readable description there instead.

How can I achieve this?

4

4 に答える 4

54

=QUERY(B2:C9;"select (C*100/B)-100 label (C*100/B)-100 'Value'")

https://developers.google.com/chart/interactive/docs/querylanguage#Label

于 2013-01-16T22:23:39.493 に答える
2

複数の列の名前を変更する場合は、1 つの LABEL キーワードを使用し、フィールドとそれらの新しい名前の割り当てをカンマで区切ります。

"select B, D, D*C where D <> 0 label D 'Staff', D*C 'Cost'"
于 2022-01-02T00:27:46.013 に答える