# Calculating Period-over-Period Changes

### **Use Case**

Calculating period-over-period changes is essential for tracking trends and growth in key business metrics such as clicks, orders, and revenue. This guide explains how to compute period-over-period comparisons, such as week-over-week or month-over-month changes, using Reorc's semantic capabilities.

### Example: Month-over-Month Change Calculation

To calculate a period-over-period metric in Reorc, follow these steps:

**Step 1: Create the Base Measure**

* Add a new measure, `no_of_member`, and define the formula. For example, use `COUNT(DISTINCT member_id)` to count distinct members.

<figure><img src="https://786945529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFTrGKWnjusKCQj11CkuL%2Fuploads%2FsJG9oK3kgjqsRdDbzg4B%2Fimage.png?alt=media&#x26;token=cc80751c-8447-4d26-9eb5-e6ed72e8e09f" alt="" width="375"><figcaption></figcaption></figure>

**Step 2: Create the Compared Measure**

* Add another measure, for example, `no_of_member_lm` having the same formula with base measure
* Enable the **Reporting Period** feature and set the time range to **Last Month**.

<figure><img src="https://786945529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFTrGKWnjusKCQj11CkuL%2Fuploads%2FnnbEZUmizquRWuVYbgn8%2Fimage.png?alt=media&#x26;token=919fc7ef-bddb-44d0-9494-c8e85ed6e81c" alt="" width="375"><figcaption></figcaption></figure>

**Step 3: Calculate the Period-over-Period Change**

* Create a new measure that calculates the change between the current month and the last month.

<figure><img src="https://786945529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFTrGKWnjusKCQj11CkuL%2Fuploads%2FFpag7iZhymW9XwfAdJcZ%2Fimage.png?alt=media&#x26;token=2bb1f23b-9a5b-4a42-94e5-750e6184f672" alt="" width="375"><figcaption></figcaption></figure>

### **Conclusion**

Reorc's rolling\_window feature allows for flexible and efficient calculation of period-over-period changes. By defining reporting period and calculated measures, users can easily track performance over time and derive meaningful insights from their data.
