DAX code
Rank by Sales =
-- ALL clears any existing Product filter so every product is ranked against every other
RANKX(ALL('Product'[ProductName]), [Total Sales], , DESC, DENSE)
Ranks the current item (e.g. a product) against all others by total sales.
Type your table and column names once. Every measure below updates.
Rank by Sales =
-- ALL clears any existing Product filter so every product is ranked against every other
RANKX(ALL('Product'[ProductName]), [Total Sales], , DESC, DENSE)
Replace 'Product'[ProductName] with the column you're ranking by (product, salesperson, region, etc.).
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Rank by Sales.