1 Reply Latest reply on Sep 10, 2018 5:48 PM by Esther Aller

# Threshold to monitor sales amount and sales weekly quantity

Hi

I am doing the worksheets in order to monitor sales, which really needs you guy's help. I have to make 2 scenarios in order to monitor the sales amount and sales quantity.

Scenario 1: I have to monitor the sales amount in weekly. In order to track the sales, the threshold to indicate whether it is above the average or below the average is 90-day moving average. With 90-day moving average, the result is correct when I showing date. However, when I roll-up the date to show in weekly, the calculation is based on pass 90-week instead of pass 90-day. Is it possible to fix the value of 90-day average?

Scenario 2: I have to monitor the sales quantity weekly also. The condition of the threshold is different based on the week of every month is in the following

every 1st week of every month the quantity should be sold more than 1,000 pieces

every 2nd week of every month the cumulative quantity (1st and 2nd week) should be sold more than 5,000 pieces

every 3rd week of every month the cumulative quantity (1st, 2nd, and 3rd week) should be sold more than 10,000 pieces

every 4th-5th week of every month the cumulative quantity  (1st, 2nd, 3rd and 4th week) should be sold more than 20,000 pieces

This condition applies every month.

The problem is I do not know the function to monitor the running total of quantity whether it is meet or below the target.

I have attached the packaged file with version 10.5. Your help is really appreciated.

• ###### 1. Re: Threshold to monitor sales amount and sales weekly quantity

Hi Apivai,

Scenario 1:

For table calculations, the level of detail needed to correctly calculate the value must be in the view. However, the view can be further modified to make it look like day hasn't been added. For starters, you can check out Computing a Table Calculation by a Dimension Not Present in the View | Tableau Software

It looks like on the various days of the week the threshold will switch between above/below. So I wasn't sure if a week has both above and below on different days, which threshold should be used for the whole week.

Scenario 2:

Meenu has a great calc for finding the week of month in this post How to display week number by Month

Hope this helps