>> Download the sample (Power BI)
This sample shows, for each Sales Person:
(i) The No. of Transactions made in the last 180 days
(ii) The group each Sales Person falls into (e.g. Top Sales People, Ok Sales People or Poor Sales People), according to the total number of transactions made in the last 180 days
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales & Sales People
Section titled “Measures - Sales & Sales People”Last Purchase Date (from selected dates)
Section titled “Last Purchase Date (from selected dates)”Last Purchase Date (from selected dates) =MAXX ( ALLSELECTED ( Sales_Table ), Sales_Table[Date] )Sales People Groupings, based on the No. of Transactions Made in the Last 180 Days
Section titled “Sales People Groupings, based on the No. of Transactions Made in the Last 180 Days”Sales People Groupings, based on the No. of Transactions Made in the Last 180 Days =CALCULATE ( SELECTEDVALUE ( 'Salespeople Transaction Group'[Group], BLANK () ), FILTER ( ALL ( 'Salespeople Transaction Group' ), [Total No. of Transactions made in the last 180 days (from selected dates)] >= 'Salespeople Transaction Group'[Min] && [Total No. of Transactions made in the last 180 days (from selected dates)] < 'Salespeople Transaction Group'[Max] ))Total No. of Transactions made in the last 180 days (from selected dates)
Section titled “Total No. of Transactions made in the last 180 days (from selected dates)”Total No. of Transactions made in the last 180 days (from selected dates) =CALCULATE ( COUNTROWS ( Sales_Table ), FILTER ( ALLSELECTED ( Calendar_Table ), Calendar_Table[Date] > [Last Purchase Date (from selected dates)] - 180 && Calendar_Table[Date] <= [Last Purchase Date (from selected dates)] ))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 ))