Hi Uday,
with that sentence: "I think the primary query location had been stored anywhere in the sheet and not been updated in the first place."... I wanted to say the following:
In my case, the user probably inserted his query into e.g. cell A3 in his sheet.
Then he decided that he wants to have the list of all variables on top of the query.
So, he probably inserted new lines (instead of moving the crosstab, as shown above) ... and somehow - I don't know how or where - the old query location was still stored by AO.
So when he tried inserting the formula, the message was shown because AO thought the query is still located in this position where the variables were intended to be shown.
Try the following:
Go to the last line, where your query results end, and mark the next line until let's say line 1000. Then remove those lines and try a new drill-down.
Regards,
Martin