Forum Discussion
Joshva
2 years agoNew Member
How to compare/calculate between two columns from different tables with missing values?
My goal is to compare two columns that are supposed to be the same. Due to some missing/differing data, this is harder to work with. The structure is simple: ID, amount. I want a measure that express...
- Anonymous2 years ago
Hi Joshva ,
bjertf , thanks for your concern about this case. I tried to create a sample data myself based on the user's requirement. Please check if there is anything that can be improved. Here is my solution:
1.Create simple data:
2.In Power Query Editor, append the two tables into a single table:
The relationship is as follows:
3.Create a new measure:
Measure = VAR _sum1 = CALCULATE(SUM(A[Amount]),FILTER(ALL(A),'A'[ID] = MAX('Append1'[ID]))) VAR _sum2 = CALCULATE(SUM(B[Amount]),FILTER(ALL(B),'B'[ID] = MAX('Append1'[ID]))) RETURN _sum1 - _sum24.The final result is as follows:
Best Regards,
Zhu
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
bjertf
2 years agoRegular Visitor
I am not sure whether what you want is possible without making another table?