I have a sheet where I use Query and Import Range formula as given here
=Query({Importrange("URL","'Trial'!A2:F");
Importrange("URL","'Trial'!A2:F")},
"Select Sum(Col6) Pivot ("&F1&")")
It works fine, but whenever I change the reference for the Pivot in Cell F1, it gives:
Error # Value : Error Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: Col6.
Once the sheet is refreshed, it works fine, this has to be repeated whenever the Reference cell value is changed..
Need Help to solve this so that the data is automatically spooled upon change in Pivot reference cell.