Getting distinct value

Hello,

I have Table A with Person ID, age, and gender. Then I have Table B with Person ID, purchase ID, purchase date. One person ID could have multiple purchase date, but multiple purchase ID.
Table A
Person ID Age Gender
1 24 Female
2 34 Male

Table B
Person ID Purchase ID Purchase Date
1 AB 1 Dec 2023
1 AB 7 Dec 2023
2 AX 15 Dec 2023
2 AX 19 Dec 2023

What I need to do is to get the total of persons by Purchase ID.
When I start with Table A, then do left join with Table B, and do the bar graph, it showed 2 persons under Purchase ID AB and Two persons under Purchase ID AX. Which actually it should be 1 person under each Purchase ID.

I tried to use distinct value, but it gives only total number of distinct value.
I'm thinking to create a custom column (Purchase ID Count) in the Table B, that will count the repetition of the Purchase ID, so that I could filter Table B with the Purchase ID Count = 1.
New Table B
Person ID Purchase ID Purchase Date Purchase ID count
1 AB 1 Dec 2023 1
1 AB 7 Dec 2023 2
2 AX 15 Dec 2023 1
2 AX 19 Dec 2023 2

Could anybody help me on the formula for the new custom column?
Or if you have a better solution to get what I'm trying to do, that would be perfect.

Thanks a lot in advance.
Vini

Do table B joined with table A by person ID.

Then gruop by purchase ID