The question that remains is how often do we need to receive our shipments. We buy food about once a month, but I'm not exactly sure. Of course I'm going to turn to Tableau to help me figure this out. First step - using my receipts to input the data into Excel (you could also export your bank transactions, but I don't always buy dog food when I go to pet stores).
I start by looking at the Dates of Purchase, which I drag out onto the row shelf by right-clicking and dragging. This gives me a few options of how I want to view my date field (I select the Discrete option at the top). I use this feature every day and it saves me so much time!
Next I want to calculate the day difference between the previous date and the date of purchase. I start by creating a field called "Previous Date".
I bring that out into my view as well (using the same right-click and dragging). Because the field is a table calculation I need to set how I want it to compute it's values. Clicking the little arrow on the right side of the pill will give me the option to Compute using > Table (Down).
Now I can calculate the day difference. Since the Previous Date field is an aggregation, the Date of Purchase needs to be as well. There are many different aggregation options I could use, but I chose the attribute option since I know I'm looking at each possible date and the most granular level.
Double clicking on my new calculation adds it to my view. While this is already very helpful, the question I am trying to answer is how many weeks between deliveries do I need. I could simply modify my calculation to take the day difference and divide by 7, but I created another calculation so that I could see the values side by side.
I added a few additional attributes to my table and hid the Previous Date column because it's just necessary for the other calculations.
You can see that I could get by with receiving an order every 3 weeks. I'm hoping our dogs continue to make the most out of a bag of food and that we aren't stranded without food. I do not want to pay for a bag of food every 2 weeks.