Removing Duplicates after joining two data sources

Table A has the correct Sum(revenue), but I need another metric from table B to divide it to get penetration. However, when I left join on table A, I notice the sum(revenue) becoming exponentially large and I’m presuming because revenue is being duplicated when the join criteria satisfies it. Now my sum(revenue) is wrong though. In Tableau there is a blend function, so it’s simple to use, but In QS there isn’t a functionality like that so that is why I am doing a left join. Does anyone have an idea for me to get the correct sum(revenue) from Table A even when left joining with Table B? Any help or guidance would be appreciated!

@darcoli Hey Darren, I saw you help solve a problem on this forum. Are you able to provide some guidance for me? I’ve been stuck on this for a few days and it’s super frusturating.

Depending on how things are set up, the following calculated field might give you the correct revenue total: sum(revenue) / count(revenue). If it does not work please give some more details on the fields in both table (id’s, revenue groups etc…)

Table A

I am left joining Table B on Table A, on monthending, marketplace id, and gl_product. I am doing sum(GMS_USD)
Table B

can you show me how the final visual is meant to look? (it’s ok if the numbers are not correct - i just want determine the right calculation for what you need)