>> Download the sample (Power BI)
This sample ranks Total Sales by both customers and products.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales, Product, & Customer
Section titled “Measures - Sales, Product, & Customer”Ranking of Total Sales, by both Customers & Products
Section titled “Ranking of Total Sales, by both Customers & Products”Ranking of Total Sales, by both Customers & Products =RANKX ( CROSSJOIN ( ALL ( Customer_Table[Customer] ), ALL ( Products_Table[Products] ) ), [Total Sales], , DESC)Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )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 ))