mountainman88
Board Regular
- Joined
- Jun 22, 2019
- Messages
- 109
- Office Version
- 2016
- Platform
- Windows
I have two sets up data which will always have identical column headings held in Table A and Table B. The data is run from the same system on two different dates to create the two data sets. The contents of the rows will change and although they do relate there is no unique identifier to link them. New rows can be added between A and B dates, rows can be removed, or existing Rows can have data changed. Below is very simplified example:
What I currently have to do is run SUMIFS() on both sets of data and then using the summarized data create the analysis below:
Now in reality the data is far more complicated than this example and I have found that using a pivot table on the individual Tables is the only practical way to navigate them. Recreating the SUMIFs each time is a pain because I have to maintain multiple combinations of dimensions that may never have data in them. This is why a pivot table is ideal, but so far I can just pivot Table A or Table B, not a set of calcs between them.
I understand I can create a separate table with every combination of Initiative and PL column and bring in summarized data from both tables, then create excel calcs and pivot that data. But I want to avoid that level of maintenance.
I have been looking at PowerQuery and PowerPivot as a solution to this issue. My question is: is there away to setup connections to the two tables as data sources, summarise them and then create calculations between the two summarized Data tables per the Delta (A-B) calculation above, and then pivot THAT data? Maybe I need to maintain a separate relational table that lists every initiative number individually, and this can create the link between the two data sets somehow, and then use Dax expressions for the calcs?
Table A | Table B | ||||||
Initiative Num | PL | FY20 | Initiative Num | PL | FY20 | ||
1 | Revenue | 1,000 | 1 | Revenue | 1,200 | ||
1 | Revenue | 5,000 | 1 | COS | 4,800 | ||
1 | SGA | 2,000 | 1 | SGA | 2,200 | ||
2 | COS | 8,000 | 2 | COS | 10,000 | ||
2 | SGA | 9,000 | 2 | SGA | 6,000 | ||
3 | Revenue | 4,000 | 3 | Revenue | 2,000 | ||
3 | COS | 6,000 | 3 | COS | 8,000 | ||
4 | SGA | 4,000 | 4 | SGA | 3,500 | ||
5 | Revenue | 1,200 | 5 | Revenue | 2,200 | ||
5 | COS | 5,800 | 5 | COS | 6,000 | ||
6 | COS | 2,500 | |||||
6 | COS | 6,000 | |||||
7 | SGA | 7,000 | |||||
46,000 | 61,400 | ||||||
What I currently have to do is run SUMIFS() on both sets of data and then using the summarized data create the analysis below:
Analysis | ||||
Initiative Num | PL | A | B | Delta (A-B) |
1 | Revenue | 6,000 | 1,200 | 4,800 |
1 | COS | - | 4,800 | (4,800) |
1 | SGA | 2,000 | 2,200 | (200) |
2 | Revenue | - | - | - |
2 | COS | 8,000 | 10,000 | (2,000) |
2 | SGA | 9,000 | 6,000 | 3,000 |
3 | Revenue | 4,000 | 2,000 | 2,000 |
3 | COS | 6,000 | 8,000 | (2,000) |
3 | SGA | - | - | - |
4 | Revenue | - | - | - |
4 | COS | - | - | - |
4 | SGA | 4,000 | 3,500 | 500 |
5 | Revenue | 1,200 | 2,200 | (1,000) |
5 | COS | 5,800 | 6,000 | (200) |
5 | SGA | - | - | - |
6 | Revenue | - | - | - |
6 | COS | - | 8,500 | (8,500) |
6 | SGA | - | - | - |
7 | Revenue | - | - | - |
7 | COS | - | - | - |
7 | SGA | - | 7,000 | (7,000) |
46,000 | 61,400 | (15,400) | ||
Now in reality the data is far more complicated than this example and I have found that using a pivot table on the individual Tables is the only practical way to navigate them. Recreating the SUMIFs each time is a pain because I have to maintain multiple combinations of dimensions that may never have data in them. This is why a pivot table is ideal, but so far I can just pivot Table A or Table B, not a set of calcs between them.
I understand I can create a separate table with every combination of Initiative and PL column and bring in summarized data from both tables, then create excel calcs and pivot that data. But I want to avoid that level of maintenance.
I have been looking at PowerQuery and PowerPivot as a solution to this issue. My question is: is there away to setup connections to the two tables as data sources, summarise them and then create calculations between the two summarized Data tables per the Delta (A-B) calculation above, and then pivot THAT data? Maybe I need to maintain a separate relational table that lists every initiative number individually, and this can create the link between the two data sets somehow, and then use Dax expressions for the calcs?
Last edited: