How it works...

For the Count measure, the first parameter is again our table, R08_Table, which has a row for every day of the years 2020, 2021, and 2022. For each row, the expression simply evaluates to the value of the date in our Value column. The iterator then simply counts how many values have been returned as its aggregation, in this case, 1,096 days. That is 366 values for 2020, a leap year, and then 365 for both 2021 and 2022.

For the Max measure, the first parameter is again our table, R08_Table, which has a row for every day of the years 2020, 2021, and 2022. For each row in the table, the expression concatenates the Year, MonthNo, and Weeknum columns using the ampersand (&) concatenation operator. Once all of the values are calculated, the MAXX function then performs the aggregation step to return the maximum value calculated, in this case, 20221253, the last week of December in the year 2022.

The Min measure works in an identical fashion to the Max measure, except that the MINX function returns the minimum value calculated, in this case, 20200101, the first week of January in the year 2020.