Ordering Columns in a Cross Tab Query & Dividing a Value

G

Guest

Hello,

First question, is there a way to specify what order the columns appear in a
cross tab query?

Second, is there a way to distribute a value in one column of a cross tab
query across new columns? For example, if I have a total value of a
contract, but I needed to recognize revenue equally in each of the three
months of a quarter, is there a way to distribute that value across columns
in a cross tab?

Thanks!
 
G

Guest

First question, is there a way to specify what order the columns appear in
a cross tab query?
In the SQL view edit the PIVOT line to something like this (Make sure the
results will match one of the entries or it will not display) ---
PIVOT HB_ALL.Cash_Flow In ("Jan", "Feb", "Mar",
"Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

Or you can get fancy like this --
PIVOT IIf(Hour([Date open]) Between 0 And 5,"0 - 5",Right("0" & Hour([Date
open]),2));

PIVOT Format([Date],"yyyy - mm - mmm");

PIVOT Format([Date],"Short Date");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top