I want to create an Rank function to count the number of times a person a visited to property BY DATE
but with condition of not including a visit category. 'Calls'
DENSE_RANK() over(partition by activitytable.[Property]
ORDER BY activitytable.[Date] as Job rank
Doing this ranks the whole of the communication table which I dont want.
TABLE
---- ActivityID ----------Property --------DATE ------CommunicationType ----------------Rank
1046 Red Property 30/10/2019 Field 2
10467 Red Property 29/10/2019 Field 1
10591 Red Property 28/10/2019 Calls
10971 Blue Property 27/10/2019 Field 2
10971 Blue Property 26/10/2019 Field 1
10971 Blue Property 26/10/2019 calls
10965 Green Property 24/10/2019 calls
10765 Green Property 23/10/2019 calls
10765 Green Property 19/10/2019 field 3
10765 Green Property 15/10/2019 field 2
10765 Green Property 12/10/2019 field 1
Ideally I want the table to appear like above to ignoring the calls elements of the communication type column and count only fields category. How could I do this?