Skip to content

Average Sales per Month, along with the Sum of all Average Sales of each Month

>> Download the sample (Power BI)

This sample shows:

(i) The total sales made each month
(ii) The average sales made each month
(iii) The total (over the year) of the average sales of each month

Average Sales per Month =
AVERAGEX ( VALUES ( Calendar_Table[Month & Year] ), [Total Sales] )

Average Sales per Month (with Summed Total)

Section titled “Average Sales per Month (with Summed Total)”
Average Sales per Month (with Summed Total) =
VAR MonthlyAverage =
AVERAGEX ( VALUES ( Calendar_Table[Month & Year] ), [Total Sales] )
VAR AverageTotal =
SUMMARIZE (
Calendar_Table,
Calendar_Table[Month],
"Monthly Average", MonthlyAverage
)
RETURN
IF (
HASONEVALUE ( Calendar_Table[Month] ),
MonthlyAverage,
SUMX ( AverageTotal, [Monthly Average] )
)
Total Sales =
SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )
Calendar_Table =
GENERATE (
CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2019, 12, 31 ) ),
VAR currentDay = [Date]
VAR Day =
DAY ( currentDay )
VAR Month =
MONTH ( currentDay )
VAR Year =
YEAR ( currentDay )
RETURN
ROW ( "Day", day, "Month", month, "Year", year )
)