For accessing AIF service and custom Query, We have to set up the data source in AX, Later these data sources are available in Excel add in.
From Organization Setup Area page. Then setup, Document management and Document Data Sources setup.
Select module for example “Account Payable”, from data source Type “Service” and from Data source Name “VendVendGroup” Check button activated and click activated.