Gasper gave an extension of the Askey–Roy formula for a beta-type integral defined on the unit circle by increasing the parameters and adding a balancing condition. Tarasov–Varchenko gave a multivariable q q -Selberg type generalization of the Askey–Roy formula. In this paper, we derive a further extension of this Tarasov–Varchenko formula by increasing the parameters and adding a balancing condition. This extension includes Gasper’s extended Askey–Roy formula as the one dimensional case. Our extension is very similar to that of the multidimensional Askey–Wilson integral to the multidimensional Nassrallah–Rahman integral. The proof is done by Aomoto’s method, which uses functions called the fundamental invariants of type A.