Beastmode- Use date range as a calculation

We are a restaurant company and like to look at "Items sold per day Calculation".

It is a pretty straightforward beastmode to get that. (Total Quantity) / (Count distinct date of business * count distinct stores).

However, if the item does not sell in a day then it is not accounted for.Β 

Example, we sell 4 of 'Product A' on Day 1, 0 of Product A on Day 2. The calculation would show the item sold per day as 4 rather than 2.

Β 

A couple of thoughts I've had but wont work. Cross joining our items table to dateofbusiness/stores so 0's can be accounted for.... won't work, dataset is already HUGE

Using a max(dateofbusiness)-min(dateofbusiness) to get the number of days. Again, may be closer but still not ideal.

Β 

The ideal solution would be to have a denomitor that equals "Number of Days being Analyzed" that works with the date range.

1
1 votes

Β· Last Updated

Comments

This discussion has been closed.