A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Pivot Query ??



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2007, 05:44 AM posted to microsoft.public.access.queries
Devlin
external usenet poster
 
Posts: 25
Default Pivot Query ??

I am using a pivot query to display totals by year and transaction type.

Example:

2000 2001 2002
TransType1 3,000 2,000
TransType2 1,000
TransType3 5,000

What I want to do is see zeros where no value occurs.

Example:

2000 2001 2002
TransType1 3,000 0 2,000
TransType2 0 1,000 0
TransType3 0 0 5,000

Can this be done?

Thanks...
  #2  
Old February 24th, 2007, 02:32 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Pivot Query ??

Post your SQL statement. (HINT: Select View: SQL from the menu while in
design view)

I think you will probably need to change the Transform statement to
something like:

TRANSFORM CDbl(NZ(SUM(FieldX),0)) as LineTotal
SELECT ...


'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


Devlin wrote:
I am using a pivot query to display totals by year and transaction type.

Example:

2000 2001 2002
TransType1 3,000 2,000
TransType2 1,000
TransType3 5,000

What I want to do is see zeros where no value occurs.

Example:

2000 2001 2002
TransType1 3,000 0 2,000
TransType2 0 1,000 0
TransType3 0 0 5,000

Can this be done?

Thanks...

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.