Skip to content

Comparison of Current Month Sales vs Sales of Best Selling previous Month

>> Download the sample (Power BI)

This sample compares:

(i) Total Sales against
(ii) The total sales of the best-selling previous month

It also shows: (iii) Current Month Sales vs the Best Previous Month Sales, as a %
(iv) Current Month Sales vs the Best Previous Month Sales, as an absolute difference

Best Previous Month Sales =
IF (
NOT ( ISBLANK ( [Total Sales] ) ),
CALCULATE (
[Total Sales],
TOPN (
1,
FILTER (
SUMMARIZE (
ALL ( Calendar_Table ),
Calendar_Table[Month & Year],
Calendar_Table[YearMonthInt]
),
Calendar_Table[YearMonthInt] < MIN ( Calendar_Table[YearMonthInt] )
),
[Total Sales], DESC
)
),
BLANK ()
)

Current Month Sales vs Best Previous Month Sales, as a %

Section titled “Current Month Sales vs Best Previous Month Sales, as a %”
Current Month Sales vs Best Previous Month Sales, as a % =
DIVIDE (
[Total Sales] - [Best Previous Month Sales],
[Best Previous Month Sales],
0
)

Current Month Sales vs Best Previous Month Sales, as a Difference

Section titled “Current Month Sales vs Best Previous Month Sales, as a Difference”
Current Month Sales vs Best Previous Month Sales, as a Difference =
[Total Sales] - [Best Previous Month Sales]
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 )
)