I've been struggling to get a solution to this business related problem for a couple of days now.. Can someone please help with finding the right approach / formula to get the desired solution?
Two tables:
Table 1.. (where the results are to be displayed in Attribute Count column) Attribute Count column currently has the "desired result", manually derived.
[TABLE="width: 172"]
<tbody>[TR]
[TD]City[/TD]
[TD]Attribute Count[/TD]
[/TR]
[TR]
[TD]Beijing[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]New York[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Tokyo[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Seoul[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Paris[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Mumbai[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]London[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
Table 2.. (Data Source)
[TABLE="width: 364"]
<tbody>[TR]
[TD]Account[/TD]
[TD]Executive[/TD]
[TD]Account Attribute[/TD]
[TD]City[/TD]
[TD]Meeting Date[/TD]
[/TR]
[TR]
[TD]AA1[/TD]
[TD]John[/TD]
[TD][/TD]
[TD]Tokyo[/TD]
[TD="align: right"]Feb-12[/TD]
[/TR]
[TR]
[TD]AA2[/TD]
[TD]Mike[/TD]
[TD]IB100[/TD]
[TD]London[/TD]
[TD="align: right"]Mar-12[/TD]
[/TR]
[TR]
[TD]AA2[/TD]
[TD]Tom[/TD]
[TD]IB100[/TD]
[TD]London[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AA2[/TD]
[TD]Harry[/TD]
[TD]IB100[/TD]
[TD]London[/TD]
[TD="align: right"]Aug-12[/TD]
[/TR]
[TR]
[TD]AA3[/TD]
[TD]Shaun[/TD]
[TD]IB100[/TD]
[TD]Mumbai[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AA4[/TD]
[TD]Greg[/TD]
[TD][/TD]
[TD]Beijing[/TD]
[TD="align: right"]Jun-12[/TD]
[/TR]
[TR]
[TD]AA5[/TD]
[TD]Sandy[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD="align: right"]Nov-12[/TD]
[/TR]
[TR]
[TD]AA5[/TD]
[TD]Frank[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD="align: right"]Nov-12[/TD]
[/TR]
[TR]
[TD]AA6[/TD]
[TD]Terry[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD="align: right"]Jan-12[/TD]
[/TR]
[TR]
[TD]AA6[/TD]
[TD]Tony[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AA7[/TD]
[TD]Mathew[/TD]
[TD]IB100[/TD]
[TD]Tokyo[/TD]
[TD="align: right"]Feb-12[/TD]
[/TR]
</tbody>[/TABLE]
I want to write a formula that helps me get the "Attribute Count" column automatically populated with the count. The count should represent:
How many "unique" accounts with 'IB100' attribute have had a meeting with us in each city?
For example: For Tokyo, the data source says a meeting happened with Mathew of AA7 and Company Attribute is IB100. Also, a meeting also happened with John of AA1 based in Tokyo, but its Company Attribute is null / nothing. So, the count in Table 1 is shown as 1.
Hope I have been able to explain the query.
Two tables:
Table 1.. (where the results are to be displayed in Attribute Count column) Attribute Count column currently has the "desired result", manually derived.
[TABLE="width: 172"]
<tbody>[TR]
[TD]City[/TD]
[TD]Attribute Count[/TD]
[/TR]
[TR]
[TD]Beijing[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]New York[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Tokyo[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Seoul[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Paris[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Mumbai[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]London[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
Table 2.. (Data Source)
[TABLE="width: 364"]
<tbody>[TR]
[TD]Account[/TD]
[TD]Executive[/TD]
[TD]Account Attribute[/TD]
[TD]City[/TD]
[TD]Meeting Date[/TD]
[/TR]
[TR]
[TD]AA1[/TD]
[TD]John[/TD]
[TD][/TD]
[TD]Tokyo[/TD]
[TD="align: right"]Feb-12[/TD]
[/TR]
[TR]
[TD]AA2[/TD]
[TD]Mike[/TD]
[TD]IB100[/TD]
[TD]London[/TD]
[TD="align: right"]Mar-12[/TD]
[/TR]
[TR]
[TD]AA2[/TD]
[TD]Tom[/TD]
[TD]IB100[/TD]
[TD]London[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AA2[/TD]
[TD]Harry[/TD]
[TD]IB100[/TD]
[TD]London[/TD]
[TD="align: right"]Aug-12[/TD]
[/TR]
[TR]
[TD]AA3[/TD]
[TD]Shaun[/TD]
[TD]IB100[/TD]
[TD]Mumbai[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AA4[/TD]
[TD]Greg[/TD]
[TD][/TD]
[TD]Beijing[/TD]
[TD="align: right"]Jun-12[/TD]
[/TR]
[TR]
[TD]AA5[/TD]
[TD]Sandy[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD="align: right"]Nov-12[/TD]
[/TR]
[TR]
[TD]AA5[/TD]
[TD]Frank[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD="align: right"]Nov-12[/TD]
[/TR]
[TR]
[TD]AA6[/TD]
[TD]Terry[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD="align: right"]Jan-12[/TD]
[/TR]
[TR]
[TD]AA6[/TD]
[TD]Tony[/TD]
[TD]IB100[/TD]
[TD]New York[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AA7[/TD]
[TD]Mathew[/TD]
[TD]IB100[/TD]
[TD]Tokyo[/TD]
[TD="align: right"]Feb-12[/TD]
[/TR]
</tbody>[/TABLE]
I want to write a formula that helps me get the "Attribute Count" column automatically populated with the count. The count should represent:
How many "unique" accounts with 'IB100' attribute have had a meeting with us in each city?
For example: For Tokyo, the data source says a meeting happened with Mathew of AA7 and Company Attribute is IB100. Also, a meeting also happened with John of AA1 based in Tokyo, but its Company Attribute is null / nothing. So, the count in Table 1 is shown as 1.
Hope I have been able to explain the query.
