MattioMatt
Registered User.
- Local time
- Today, 05:40
- Joined
- Apr 25, 2017
- Messages
- 99
I'm currently using a Crosstab query to be able to output statistics on a month by month basis. This is providing me with a count of statuses based on an inventory month by month.
I'm going to be uploading my data from Excel on a monthly basis. I've added a field to populate the date at which the data was uploaded on.
An example of what I'm acheiving at the moment (which is what I wanted) is the below:
My query is as follows:
I'd like to calculate the change between the months. I was looking at having a change column for each month, but quickly found I couldn't do this within the Crosstab query, simply because I've not been able to use a field for any calculations. If I try to use The UploadDate or CountOfID Access says it can't find a field with that name.
I then tried to created a new query and use the crosstab query as the source. The problem I've ran into here is that the month fields are dynamic and making the calculation is manual. Is there a way to 'automate' this?
I'm going to be uploading my data from Excel on a monthly basis. I've added a field to populate the date at which the data was uploaded on.
An example of what I'm acheiving at the moment (which is what I wanted) is the below:
My query is as follows:
Code:
TRANSFORM Count(tbl_Inventory.ID) AS CountOfID
SELECT tbl_Inventory.ApprovalStatus
FROM tbl_Iventory
GROUP BY tbl_Iventory.ApprovalStatus
PIVOT Format([UploadDate],"mmm-yy");
I'd like to calculate the change between the months. I was looking at having a change column for each month, but quickly found I couldn't do this within the Crosstab query, simply because I've not been able to use a field for any calculations. If I try to use The UploadDate or CountOfID Access says it can't find a field with that name.
I then tried to created a new query and use the crosstab query as the source. The problem I've ran into here is that the month fields are dynamic and making the calculation is manual. Is there a way to 'automate' this?