1

I have a spreadsheet with clients first purchase I want to see how many new clients a month we are getting. However some of the clients we sell too could have the same name in a different zip code for example miami clinic could be in both florida and ohio so I want them counted individually. I also want to see the total new clinics per month. but if a clinic purchases in january and again in march i only want that january purchase counted

AnilGoyal
  • 25,297
  • 4
  • 27
  • 45
  • You could create a simple tableau function to combine the text of the name and zip code to create a unique ID for each clinic and then group by that. And then write some (more complex) function to select the first purchase date for each clinic. All very doable. – matt_black Feb 10 '21 at 14:04
  • Hi Welcome to SO. You actually need a cohort analysis in Tableau. Not that difficult. Share some of your sample data for demostration, please. – AnilGoyal Feb 11 '21 at 05:49

1 Answers1

0

Let us assume your sample data be like

enter image description here

Now create a calculated field first purchase date as

{Fixed [Clinic Name], [Zipcode]: min([Sale Date])}

This field will give each clinic its first purchase date only. Check it

enter image description here

Now to create a filter for first purchase date create a calculated field say first purchase filter as

[first purchase date] = [Sale Date]

Adding TRUE value filter (and don't forget to add the filter to context by right clicking it) will give sale amount in first purchases

enter image description here

OR use this filter for differentiation also

enter image description here

For any further query please share your actual data structure with a few rows and desired output in respect of those sample rows.

AnilGoyal
  • 25,297
  • 4
  • 27
  • 45