>> Download the sample (Power BI)
This sample shows cumulative sales, using ALLEXCEPT, so that the cumulative calculation does not reset from the original start date.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales
Section titled “Measures - Sales”Cumulative Revenue
Section titled “Cumulative Revenue”Cumulative Revenue =CALCULATE ( [Total Revenue], FILTER ( ALLEXCEPT ( Calendar_Table, Calendar_Table[Week No] ), Calendar_Table[Date] <= MAX ( Calendar_Table[Date] ) ))Max Sales by Product by Region
Section titled “Max Sales by Product by Region”Max Sales by Product by Region =VAR ProductRegions = GROUPBY ( Sales_Table, Products_Table[Products], Region_Table[Region], "Sales", SUMX ( CURRENTGROUP (), Sales_Table[Quantity] * Sales_Table[Unit Price] ) )RETURN MAXX ( ProductRegions, [Sales] )Total Revenue
Section titled “Total Revenue”Total Revenue =SUMX ( Sales_Table, Sales_Table[Quantity] * Sales_Table[Unit Price] )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 ))