'Append text at the end of a Query in Google Sheet

i'm trying to append the word "End" in the next row at the end of a Query, i saw here a code to do it but today this doens't work, add the word at the end of the first column header and do not load the query.

=QUERY('PT--------------'!A1:M953,"select * where (I<>'N/A')",1)&"End"

Results in:

Cash AccountEnd

without the '&"end"' it does the Query:

Cash Account    Date    Reference   Receipt Payment method  Client ID   Amount  Number of Distributions Invoice Paid    G/L Account Sales Tax ID    TOTAL PAID IN INVOICES  Prepayment

what i'm doing wrong?



Solution 1:[1]

try:

=INDEX({QUERY('PT--------------'!A1:M953,
 "where I<>'N/A'", 1); {"End", IFERROR(SEQUENCE(1, 12)/0)}})

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1