>> Download the sample (Power BI)
This sample shows the minimum of this year’s and last year’s sales.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales
Section titled “Measures - Sales”Min Revenue (Correct Total)
Section titled “Min Revenue (Correct Total)”Min Revenue (Correct Total) =SUMX ( SUMMARIZE ( Customer_Table, Customer_Table[Customer] ), MIN ( [Total Revenue], [Total Revenue LY] ))Min Revenue (Incorrect Total)
Section titled “Min Revenue (Incorrect Total)”Min Revenue (Incorrect Total) =MIN ( [Total Revenue], [Total Revenue LY] )Total Revenue
Section titled “Total Revenue”Total Revenue =SUMX ( Sales_Table, Sales_Table[Quantity] * Sales_Table[Unit Price] )Total Revenue LY
Section titled “Total Revenue LY”Total Revenue LY =CALCULATE ( [Total Revenue], DATEADD ( Calendar_Table[Date], -1, YEAR ) )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 ))