How to Display Sales by Number of Purchases for Each Customer

Published: 13 Dec 2023
Last Modified Date: 14 Dec 2023


When visualizing daily sales for each customer, a view such as below has a lot of blank cells, making comparisons difficult. How can we display sales by number of purchases for each customer to facilitate comparison?

User-added image


  • Tableau Desktop


Follow along in the sample packaged workbook found in the Attachments section to display sales by number of purchases for each customer.

User-added image

1. Create a calculated field and name it Number of purchases.
2. Add Number of purchases to Columns.
3. Add Customer Name to Rows.
4. Add SUM(Sales) to Text.
5. Add Order Date to Detail.
6. Right-click Number of purchases in Columns and select Edit Table Calculation. Configure it as follows.
User-added image

Note: For the above setting, the date added to Detail is displayed in the tooltip.
User-added image

If you want the date to appear on the view as well, change the date field from Detail to Text.
User-added image
Did this article resolve the issue?