>> Download the sample (Power BI)
This sample shows and compares:
(i) The total number of sales orders made
(ii) The total number of sales orders above 2,500
(iii) The total number of sales orders made by the top 4 customers only (based on the total sales ever made to them)
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales, & Orders
Section titled “Measures - Sales, & Orders”Sales of Top 4 Customers
Section titled “Sales of Top 4 Customers”Sales of Top 4 Customers =CALCULATE ( [Total Sales], TOPN ( 4, ALL ( Customer_Table ), CALCULATE ( [Total Sales], ALL ( Calendar_Table ) ), DESC ), VALUES ( Customer_Table[Customer] ))Total Orders
Section titled “Total Orders”Total Orders =COUNTROWS(Sales_Table)Total Orders above 2500
Section titled “Total Orders above 2500”Total Orders above 2500 =COUNTROWS ( FILTER ( Sales_Table, [Total Sales] > 2500 ) )Total Orders of Top 4 Customers
Section titled “Total Orders of Top 4 Customers”Total Orders of Top 4 Customers =COUNTROWS ( CALCULATETABLE ( Sales_Table, TOPN ( 4, ALL ( Customer_Table ), CALCULATE ( [Total Sales], ALL ( Calendar_Table[Date] ) ), DESC ) ))Total Sales
Section titled “Total Sales”Total Sales =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 ))