For more details about the functions used in this recipe, refer to the following links:
- DISTINCT (Table): https://docs.microsoft.com/en-us/dax/distinct-table-function-dax
- SELECTCOLUMNS: https://docs.microsoft.com/en-us/dax/selectcolumns-function-dax
- COUNTROWS: https://docs.microsoft.com/en-us/dax/countrows-function-dax
- ADDCOLUMNS: https://docs.microsoft.com/en-us/dax/addcolumns-function-dax
- MAX: https://docs.microsoft.com/en-us/dax/max-function-dax
- MIN: https://docs.microsoft.com/en-us/dax/min-function-dax
- SUBSTITUTE: https://docs.microsoft.com/en-us/dax/substitute-function-dax