I have a table called CarSales with the following sample data:

1

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

1

1 Answer

Try the following measure:

= VAR ThisCountry = MIN( CarSales[Country] ) RETURN RANKX( FILTER( ALLSELECTED( CarSales ), 'CarSales'[Country] = ThisCountry ), [NetSales] ) 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.