Forum Discussion
Help comparing two excel worksheets in Power BI
- 9 years ago
Hi enzo2011
Did you find a solution for your issue?
I managed to reproduce your example and came up with this.When importing both of your worksheets, add a custom column to each of them, let's call it "IndexCol" having the values "A" and "B" for each table respectively.
Now that both tables are there with a "flag" for each one, go to edit queries and choose to append queries as new
Choose both tables, one as primary and one as secondary, apply and close.
In your report view, you will now see a new table having all of table A and table B elements.
Create a new calculated column as follows:Q4Files = CALCULATE(SUM(Append1[Files]), Append1[IndexCol]="B") - CALCULATE(SUM(Append1[Files]), Append1[IndexCol]="A")
Choose the table visual and add to it Process and Q4Files, make sure you are making your selection from the newly created table Append1 and that Q4Files is groupes as sum.You should get the following
Tell me how it works!
EDIT: if you have unique process values in both tables, why don't you create a 1:1 relationship between both worksheets on the process. Then create a calculated column on Table2 as follows: Q4Files = Table2[Files]-RELATED(Table1[Files])
Not exactly sure of your issue, but it sounds like an Append query would be what you want to do in order to take your original query and append all of the rows of your new workbook to it.
First of all thanks for the quick response.
The problem is that I cannot append the two workbooks, because then I'd be double counting files twice. Let me clarify it. In workbook A I've got data of the 1st/2nd/3rd quarter of 2016. And in workbook B I've got data of the 1st/2nd/3rd/4th quarter of 2016. Therefore if I wanna know what's the new data added in workbook B, I should do B-A.