Pretty sure you will have to use AGGR to rank the data at the TYPE and COUNTRY level in order to break it out by Country Dimension. I don't have a lot of time but this looks like a really fun challenge so I'm using the time I have left to give it a go. Thank you for sharing the QVF so I didn't have to make up data.