user13876647
user13876647

Reputation:

Formula Solution required

I have been using this formula and now the issue is this formula should mention the accurate value in the desired format let me show you the two pictures taking data from first picture and applying formula on 2nd please check "Jan" - Col"AO" is empty but formula is putting the "Feb" values.

enter image description here

enter image description here

=QUERY({A33:AM61,ARRAYFORMULA(AO33:AZ61+0)}, "Select Col1, SUM(Col41), SUM(Col42), SUM(Col43), SUM(Col44), SUM(Col45), SUM(Col46), SUM(Col47) Where Col1 is not null Group by Col1 LABEL Col1 'CityPrime Down Town', SUM(Col41) 'Jan', SUM(Col42) 'FEB', SUM(Col43) 'MAR', SUM(Col44) 'APR', SUM(Col45) 'MAY', SUM(Col46) 'JUN', SUM(Col47) 'JUL'", 1)

Upvotes: 0

Views: 36

Answers (1)

Erik Tyler
Erik Tyler

Reputation: 9355

HSAR, your QUERY as written does not include Column AN. You have A:AM and then AO:AZ. So while Column AM is #41 in the full spreadsheet, it's only #40 in your QUERY. This has the effect of offsetting all of your sums by one column. If you start your QUERY SUMs at Col40, the problem should be solved. (Or, alternatively, you could change the first part of your QUERY reference to include A:AN instead of A:AM.)

I have added two sheets to your spreadsheet, illustrating each of the above changes.

Upvotes: 1

Related Questions