google-sheetsgoogle-drive-apigoogle-sheets-query

Google Sheets: How to replace text in column header?


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?


Solution

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

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