Hide zeros and Average between records

guto.bartinho

New Member
Joined
May 31, 2008
Messages
14
Hello, since I am new to Access I need help with my Query.

In my example table below I have site, indicator and then the months values.






1- How do I hide blank/zero rows in my query? (Campinas,Indaiatuba and Curitiba for example). I can't use WHERE(jan/15<>0) or (feb/15<>0) statement for example because in my original table I may have Blank sites as well and this is another query criteria to filter valid sites

2- Is there any way to create records in my table through a query? I need a new indicator (Avg.Customers for example) that is the month average between month Beg.Customers and Fin.Customers. In the example Avg.Customers from São Paulo in jan/15 would be 2450 (2000+2900)/2

Thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Click File>Options>Advanced. Under Display options for this worksheet, select a worksheet, and then do one of the following: To display zero (0) values as blank cells, uncheck the Show a zero in cells that have zero value check box.

I can't help you much with your 2nd question. Sorry.
 
Upvote 0
With your current table layout you will continue to have issues getting your data out in a query. Suggest you reorganize your table in the following layout

Table1
------------
Site
Indicator
Month
Value

In your criteria for the value, you can then make it "<>0 or Is Null"

Suggest you read this on setting up data bases.

http://sbuweb.tcu.edu/bjones/20263/Access/AC101_FundamentalsDB_Design.pdf
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,261
Messages
6,171,076
Members
452,377
Latest member
bradfordsam

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