Request
The finance operations lead needs a first-half report. One row represents one month from January through June 2025. Cancelled orders are excluded. Returned order value is shown separately and subtracted to calculate RETAINED_VALUE.
Done
SANDBOX.MONTHLY_CLOSE is a secure view returning MONTH, REVENUE, CUSTOMERS, RETURNED_VALUE and RETAINED_VALUE. These are operational order measures, not recognized accounting revenue. Don't join order lines or count a customer twice within a month.
A month-end report needs definitions that someone else can repeat. Here the source is the order header table, the window is the first half of 2025, and cancelled orders leave every measure. Revenue in this exercise means the order value of the remaining headers. The brief uses an operational definition, so don't describe it as recognized accounting revenue.
Add one measure at a time and check the grain after each edit. A customer with several orders counts once per month. Returned value is a conditional sum within the same cohort, and retained value subtracts it from the monthly total. The final secure view publishes those definitions under a stable name for other reports.