First of all, This is "Chi2Test_p" not the script function. You can try
Aggr(Chi2Test_p([A],[B],[C],[D]), A)
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful