Reputation: 1
I have a table called CarSales
with the following sample data:
I already have a measure that ranks all Brands by sales:
Rank = RANKX(ALL('CarSales'[Brand]),[NetSales])
However, I need another measure/column **"Rank(Country)
" ** which ranks the Brands within the Country group (without having to display the Country group in the table)
Thanks
Upvotes: 0
Views: 3657
Reputation: 9062
Try the following measure:
=
VAR ThisCountry =
MIN( CarSales[Country] )
RETURN
RANKX(
FILTER( ALLSELECTED( CarSales ), 'CarSales'[Country] = ThisCountry ),
[NetSales]
)
Upvotes: 1