Phocas has a new user documentation site. This site will be retired soon.

Example - calculation rule

Use advanced search to locate product sales that are ahead of target

This example uses an advanced search containing a calculation rule to find products that exceeded promotional target (in this example, there were promotions on nine separate days in December and we want to locate all products that exceeded our promotional target of $10000 in sales.

  1. Choose the 'Sales' database and select the Search icon  .

  2. Choose 'Product' from the dimension drop down box.

  3. Select Plus   > Calculation.

  4. Define the variables as the nine days in December when the promotions were active:
    • Select the gray Plus  to add variable a. Choose Stream = Sales and Measure = Value, and then click the period tab, set the Time Unit to Day, and start on 2nd Dec and end 4th Dec.
    • Add variable b. Choose Stream = Sales and Measure = Value, and then click the period tab, set the Time Unit to Day, and in our case start on 12th Dec and end 13th Dec.
    • Add variable c. Choose Stream = Sales and Measure = Value, and then click the period tab, set the Time Unit to Day, and in our case start on 23rd Dec and end 26th Dec.
    • To add up the sales on all the promotional days, in the Expression box, enter the formula 'a+b+c'
    • From the Search Type drop down, choose Greater Than and enter '10000'.
    • Your set of rules should appear similar to the image below. Apply.

A list of products that have exceeded sales of $10,000 on promotional days will appear and a summary of your advanced search rules will appear in the Status bar.

Note: Your grid settings may not match your advanced search settings. For this particular example, the results will be best viewed in the product dimension, period mode, measures set to value, with Periods set to show days in December.