Forum Discussion
3mi81
1 year agoRegular Visitor
Comparing values between different tables
Hello, I have a table "LIST" composed by three columns: ID, COD, VALUE. I have another table "CONTAINER" composed by two columns : COD , SUM_OF_VALUE I would like to save in the SUM_OF_VALUE column...
- 1 year ago
Ok. If you're using Power BI Desktop you just need to apply both your tables to the model, relate LIST to CONTAINER on CONTAINER[COD] 1 = * LIST[COD] (assuming your CONTAINER table contains a UNIQUE list of customers), then drag CONTAINER[COD] and LIST[VALUE] columns into a visual. PBI will automatically aggregate the result giving you what it sounds like you're after.
If this is to be done in Excel, then probably easiest to just do a merge in PQ instead of a relationship as described above in the model.
Pete
- 1 year ago
Use merge query in Power Query, or load the data into the model and use DAX to calculate (aggregate and then determine whether it is greater than 0).