You need to Group by the targeting dimension. The primary key of the targeting dimension is always included in the results and that is what this error message is referring to. Edit the additional data and click on the Advanced settings link to do get to this setting.
I am using a preloading in web form.so in there i don't see any
checkbox to Group by the targeting dimension.
How can i use query in a webform to display the count of all participants or some of a recipient field?
The Data Management options are much more limited in a web application workflow than in a Campaign workflow. Can you provide screen shots of what you have implemented?