Your model looks great, that's exactly it! I tried to replicate in my base and there were some inconsistencies, I believe due to the complexity compared to your example.
I have data from 2016 so far, this was a complicating factor, they are also divided into other tables:
PBI_fSales - Fact Table - Sales
"Invoice ID" "Product ID" "Quantity of sold products"
PBI_dProdutos - Dimension Table - Products
"Product ID" "Short Description (name)" "Group"
BPI_dCalendar - Dimension Table - Dates
(Year, Month, day)
We have a ready-made measure that sums up all sales, called "Total Quantity".
I need to calculate the average of the TOP 3 products considering in context the year that is being filtered, your model calculates exactly as I need it, but I believe the date context when I tried to replicate in my database conflicted because the same product appears in years / months of other periods totaled and maybe this confuses the ranking