Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Counting Email Address Occurances on seperate table

I have two different tables containing email addresses:

 

TableA

[email protected]

[email protected]

[email protected]

 

TableB

[email protected]

[email protected]

[email protected]

[email protected]

[email protected]

 

I would like to have a calculated column on TableA that would count the number of occurrences of that email in TableB

 

TableA

[email protected]     3

[email protected]     0

[email protected]     2

 

I've done some searching and I beleive that it will involve COUNTX, FILTER, and EARLIER but I am struggling to make it work. Any assistance would be appreciated. Thank you.

  • Anonymous  Please try this as a New Column

     

    For your reference:
    Test244LkpCountMain -> TableA

    Test244Lkp -> TableB

     

    Count = 
    VAR _Cnt = COUNTROWS(FILTER(Test244Lkp,Test244Lkp[Email]=Test244LkpCountMain[Email]))
    RETURN IF(ISBLANK(_Cnt),0,_Cnt)

1 Reply

  • PattemManohar's avatar
    PattemManohar
    Community Champion

    Anonymous  Please try this as a New Column

     

    For your reference:
    Test244LkpCountMain -> TableA

    Test244Lkp -> TableB

     

    Count = 
    VAR _Cnt = COUNTROWS(FILTER(Test244Lkp,Test244Lkp[Email]=Test244LkpCountMain[Email]))
    RETURN IF(ISBLANK(_Cnt),0,_Cnt)