To prepare for this recipe, do the following:
- Open Power BI Desktop.
- Use an Enter Data query to create a table called R02_Table with the following data:
Date |
Customer |
3/1/2015 |
1 |
12/1/2016 |
1 |
6/1/2017 |
2 |
8/1/2017 |
2 |
9/1/2017 |
2 |
1/1/2018 |
3 |
3/1/2018 |
3 |
1/1/2019 |
4 |
3/1/2019 |
5 |
8/1/2019 |
4 |
9/1/2019 |
3 |
9/1/2019 |
2 |
9/1/2019 |
5 |
9/1/2019 |
4 |
9/1/2019 |
6 |
9/1/2019 |
6 |
- Create the following columns in R02_Table:
Month Name = FORMAT([Date],"mmmm")
Year = YEAR([Date])
Month = MONTH([Date])
- Create the following measure:
Customers = COUNTROWS(VALUES('R02_Table'[Customer]))
- On a Report page, create a matrix visualization with the Month Name column as Rows, the Year column as Columns, and the Customers measure as Values.
- Set the Sort by column for the Month Name column to the Month column.