Skip to content

Day with the Highest Average Sales per Day

>> Download the sample (Power BI)

This sample shows, for each product, the day on which the average sales per day is highest.

Average Sales per Day =
AVERAGEX ( VALUES ( Calendar_Table[Date] ), [Total Sales] )

Day with the Highest Average Sales per Day

Section titled “Day with the Highest Average Sales per Day”
Day with the Highest Average Sales per Day =
MAXX (
TOPN (
1,
SUMMARIZE (
Calendar_Table,
Calendar_Table[Name of Day],
"Selling Days", [Average Sales per Day]
),
[Selling Days]
),
Calendar_Table[Name of Day]
)
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 )
)