Hi
I hve below data returned without using PIVOT. I want to add Months also. How it can be done without using Pivot.
Accounts,Sale,Admin are fixed.
| Accounts | Sale | Admin | |
| Location 1 | 5,841.00 | 31,500.00 | 14,250.00 |
| Location 2 | 2,920.50 | 0 | 0 |
| Location 3 | 2,920.50 | 0 | 0 |
| Location 4 | 0 | 1,500.00 | 20,250.00 |
| Location 5 | 7,788.00 | 0 | 96,750.00 |
I want Da
| April | May | |||||
| Accounts | Sale | Admin | Accounts | Sale | Admin | |
| Location 1 | 5,841.00 | 31,500.00 | 14,250.00 | 0.00 | 0.00 | 0.00 |
| Location 2 | 2,920.50 | 0 | 0 | 2,920.50 | 0 | 0 |
| Location 3 | 2,920.50 | 0 | 0 | 2,920.50 | 0 | 0 |
| Location 4 | 0 | 1,500.00 | 20,250.00 | 0 | 1,500.00 | 20,250.00 |
| Location 5 | 7,788.00 | 0 | 96,750.00 | 0.00 | 0 | 0.00 |
ta like below. Monthe can be more 5,6,7,8 & so on till 12.
Thanks
Sophia CarterPosted Mar 7, 2025, 9:22 AM
To add months to your existing data without using PIVOT, you can extend the table structure accordingly. Here is how you can achieve this:
1. Extend the table header to include months beyond April and May.
2. Duplicate the columns for each month, maintaining the structure for Accounts, Sale, and Admin.
3. Populate the data for each location under the corresponding month columns.
Here is an example of how the extended table structure might look for three months (April, May, June):
You can continue this pattern for additional months as needed by duplicating the columns and populating the data accordingly for each location. This approach maintains the structure of your data without using the PIVOT function. If you have more months to add or need further clarification, feel free to ask!