>> Download the sample (Power BI)
This sample shows which customers are buying behind trend, by comparing their 90-day sales running total this year with their 90-day sales running total from last year.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales, Customer, and Calendar Time
Section titled “Measures - Sales, Customer, and Calendar Time”Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )Total Sales 90D Running Total
Section titled “Total Sales 90D Running Total”Total Sales 90D Running Total =CALCULATE ( [Total Sales], FILTER ( ALL ( Calendar_Table[Date] ), Calendar_Table[Date] > MAX ( Calendar_Table[Date] ) - 90 && Calendar_Table[Date] <= MAX ( Calendar_Table[Date] ) ))Total Sales 90D Running Total LY
Section titled “Total Sales 90D Running Total LY”Total Sales 90D Running Total LY =CALCULATE ( [Total Sales 90D Running Total], SAMEPERIODLASTYEAR ( Calendar_Table[Date] ))Total Sales differences in 90D Running Total 90D (CY vs LY)
Section titled “Total Sales differences in 90D Running Total 90D (CY vs LY)”Total Sales differences in 90D Running Total 90D (CY vs LY) =[Total Sales 90D Running Total] - [Total Sales 90D Running Total LY]Tables
Section titled “Tables”Calendar_Table
Section titled “Calendar_Table”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 ))