Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am needing to calculate the average value of sales invoiced and ordered in the same month for a rolling 3, 6, and 12 months. I have created a few measure:
Daily trend is used to calculate what the monthly trend should be based on the number of working days for the month.
I created a daily trend measure below (the last part updates for 6 and 12 months):
Solved! Go to Solution.
Hi @Libbyb23 - I hope you already have a seperate date table which is essential to work on time intelligence functions , if not please create one date table using new table and create a relationship with your sales table and Date table.
Calculating the average daily orders for the previous 3, 6, and 12 months:
Hope you already calculated
Sales_Invoiced_Ordered_Same_Month =
CALCULATE(
SUM('Sales Data'[sales_price]),
FILTER(
'Sales Data',
MONTH('Sales Data'[order_date]) = MONTH('Sales Data'[invoice_date]) &&
YEAR('Sales Data'[order_date]) = YEAR('Sales Data'[invoice_date])
)
)
To calcualte rolling averages,
Rolling3Months_Sales =
CALCULATE(
[Sales_Invoiced_Ordered_Same_Month],
DATESINPERIOD(
'DateTable'[Date],
MAX('DateTable'[Date]),
-3,
MONTH
)
)
Rolling6Months_Sales =
CALCULATE(
[Sales_Invoiced_Ordered_Same_Month],
DATESINPERIOD(
'DateTable'[Date],
MAX('DateTable'[Date]),
-6,
MONTH
)
)
Rolling12Months_Sales =
CALCULATE(
[Sales_Invoiced_Ordered_Same_Month],
DATESINPERIOD(
'DateTable'[Date],
MAX('DateTable'[Date]),
-12,
MONTH
)
)
similarly you calculate for Rolling3months_Days,Rolling6months_Days,Rolling12months_Days
calculate Average Daily Order Value by dividing the DIVIDE([Rolling3Months_Sales], [Rolling3Months_Days]),6 months, 12 months.
The above measures will calculate the average daily orders for the last 3, 6, and 12 months
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @Libbyb23 - you can try below logic to get the same.
3 Month Trend =
CALCULATE(
SUM('Sales Data'[sales_price]),
FILTER(
'Sales Data',
'Sales Data'[Order Date Trend] = 'Sales Data'[Invoice Date Trend]
),
DATESINPERIOD(
'Date Dimension'[FullDateAlternateKey],
EOMONTH(TODAY(), -1), -- This gets the end of the last month
-3,
MONTH
)
)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @Libbyb23 - I hope you already have a seperate date table which is essential to work on time intelligence functions , if not please create one date table using new table and create a relationship with your sales table and Date table.
Calculating the average daily orders for the previous 3, 6, and 12 months:
Hope you already calculated
Sales_Invoiced_Ordered_Same_Month =
CALCULATE(
SUM('Sales Data'[sales_price]),
FILTER(
'Sales Data',
MONTH('Sales Data'[order_date]) = MONTH('Sales Data'[invoice_date]) &&
YEAR('Sales Data'[order_date]) = YEAR('Sales Data'[invoice_date])
)
)
To calcualte rolling averages,
Rolling3Months_Sales =
CALCULATE(
[Sales_Invoiced_Ordered_Same_Month],
DATESINPERIOD(
'DateTable'[Date],
MAX('DateTable'[Date]),
-3,
MONTH
)
)
Rolling6Months_Sales =
CALCULATE(
[Sales_Invoiced_Ordered_Same_Month],
DATESINPERIOD(
'DateTable'[Date],
MAX('DateTable'[Date]),
-6,
MONTH
)
)
Rolling12Months_Sales =
CALCULATE(
[Sales_Invoiced_Ordered_Same_Month],
DATESINPERIOD(
'DateTable'[Date],
MAX('DateTable'[Date]),
-12,
MONTH
)
)
similarly you calculate for Rolling3months_Days,Rolling6months_Days,Rolling12months_Days
calculate Average Daily Order Value by dividing the DIVIDE([Rolling3Months_Sales], [Rolling3Months_Days]),6 months, 12 months.
The above measures will calculate the average daily orders for the last 3, 6, and 12 months
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi!
For this, is there a way to use previous 3 months based on the date (today)? For example, having the view be the previous 3 months from June 3. So march 3, April, 3, and May 3?
Hi @Libbyb23 - you can try below logic to get the same.
3 Month Trend =
CALCULATE(
SUM('Sales Data'[sales_price]),
FILTER(
'Sales Data',
'Sales Data'[Order Date Trend] = 'Sales Data'[Invoice Date Trend]
),
DATESINPERIOD(
'Date Dimension'[FullDateAlternateKey],
EOMONTH(TODAY(), -1), -- This gets the end of the last month
-3,
MONTH
)
)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi!
Thanks again!! Yes that worked perfect.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |