Link to home
Start Free TrialLog in
Avatar of AndyC1000
AndyC1000

asked on

Query to change format of table - field value to columns (new fields)

Dear all,

I have a table in the below format:

M      Y      District      Role      CountOfRole
1      2010      18      Admin      1
1      2010      19      IT      1
2      2010      18      Admin      2
2      2010      19      IT      1


I need to change the format to:

M      Y      District      Admin      IT
1      2010      18      2      1
2      2010      19      1      1

Is this possible in a query? Apologies for the alignment of example data.
SOLUTION
Avatar of Deepak Lakkad
Deepak Lakkad
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AndyC1000
AndyC1000

ASKER

Could you provide an example?
I've tried to use the cross tab query wizard, the issue I'm having is at the 'what number do you want calculated for each column and row intersection.  I've selected the field 'CountOfRole' and I'm not sure which option to select - avg, count, var, first etc.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial