Error: Cannot group on Fields selected with '*'.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
'm getting Error: Cannot group on Fields selected with '*'. when trying to use sum query....
Why is this happening?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Because you can't group on fields selected with *?:)

If you are doing this in the query designer just select all the fields you want from the table and drag them from the list down to the field row.

Then from the dropdown select Sum/Count for the fields you want to count.

PS That's assuming you are using the query designer.
 
Upvote 0
Because you can't group on fields selected with *?:)

If you are doing this in the query designer just select all the fields you want from the table and drag them from the list down to the field row.

Then from the dropdown select Sum/Count for the fields you want to count.

PS That's assuming you are using the query designer.



Hi Noriw, you're right...me, 'm using the query designer...
I tried that way but still errors...




Code:
[/FONT]
[FONT=Courier New]SELECT Count(Months.ID) AS CountOfID, Count(Months.MyMOnths) AS CountOfMyMOnths, Count(Months.UserNames) AS CountOfUserNames, Sum(Months.REVS) AS SumOfREVS, *
FROM Months;
 
Upvote 0
You've still got the *.

Delete the column where the field row has Months.*.
 
Upvote 0
I dont know where 'm doing it wrong...
I have removed all the cols....just rev col is remaining....still errors...
 
Upvote 0
Pedie

Why not just abandon the query and start over?
 
Upvote 0
SELECT Sum(Months.rEVS) AS SumOfrEVS, *
FROM Months;


I tried all over again and wont work...:confused:
 
Upvote 0
As Norie has said numerous times, remove the "*".

Code:
SELECT Sum(Months.rEVS) AS SumOfrEVS
FROM Months;
 
Upvote 0
As Norie has said numerous times, remove the "*".

Code:
 [/FONT]
[FONT=Courier New]SELECT Sum(Months.rEVS) AS SumOfrEVS[/FONT]
[FONT=Courier New]FROM Months;[/FONT]
[FONT=Courier New] [/FONT]
[FONT=Courier New]



Now it does not error...however I like to add multiple conditions to sum 5 conditions actually....how can i do tha like sumifs in Excel.

Thanks again for helping:)
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top