Pivot with multiple data field in Access

  • Thread starter NoviceAccessUser-Melanie
  • Start date
N

NoviceAccessUser-Melanie

By using the first tip you offered, I am now able to get the data for either
year and type out through crosstab queries. Now I am having difficulty
merging them back without exceeding the 255 field limit in a query.

I combined all the data into one table and used an identifier for the type
of data.
TYPE Year DataField1
DataField2 DataField3 etc
Actual "Yr1"
Discounted "Yr2"
Original Yr3"...(right now through Yr20)

I have the users select if an entry is Actual, and for what year of the Deal
it is.

Here's what my report should look like:

Deal No. Yr.1 Yr2 Yr3 Yr4
....
111
Actuals: 725 5301 17605 2459
Discounted: 525 5201 15605 2159
Original: 825 5401 1900 2700

112
Actuals: 1111 2222 3333 4444
Discounted: 999 888 777 666
Original: 1000 2000 3000 4000

The Crosstab query below was able to get me this result:
TRANSFORM First(LIHTC_1.LIHTC) AS ALLLIHTC
SELECT LIHTC_1.Ind, LIHTC_1.DealID
FROM LIHTC_1
GROUP BY LIHTC_1.DealID, LIHTC_1.Ind
PIVOT LIHTC_1.YearID;

Result:
DealID Yr1 Yr2 Yr3
Yr4
Actuals DataField1 DataField1 DataField1
DataField1
Original DataField1 DataField1 DataField1
DataField1
Discounted DataField1 DataField1 DataField1 DataField1

I would like to be able to get more datafields (Ex. LIHTC) added to my
results. If I do a separate query for each datafield, by the time I create a
query to bring them all together, I will exceed the 255 field limit. Is there
another approach I can take that is not apparent to me right now? I would
greatly appreciate any thoughts on how to tackle this issue.
Thank you.
 

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