Sample Data
Sales data for different fruits with their sales numbers.
| Cell | Value |
|---|---|
| A1 | Product |
| B1 | Sales |
| A2 | Apples |
| B2 | 150 |
| A3 | Bananas |
| B3 | 200 |
| A4 | Cherries |
| B4 | 120 |
| A5 | Dates |
| B5 | 200 |
| A6 | Elderberries |
| B6 | 90 |
Sales data for different fruits with their sales numbers.
| Cell | Value |
|---|---|
| A1 | Product |
| B1 | Sales |
| A2 | Apples |
| B2 | 150 |
| A3 | Bananas |
| B3 | 200 |
| A4 | Cherries |
| B4 | 120 |
| A5 | Dates |
| B5 | 200 |
| A6 | Elderberries |
| B6 | 90 |
RANKX(ALL('Table'[Product]), CALCULATE(SUM('Table'[Sales])), , DESC, Skip)A B 1 Product Sales 2 Apples 150 3 Bananas 200 4 Cherries 120 5 Dates 200 6 Elderberries 90 Formula references all products in column A and sales in column B.
A B C 1 Product Sales Rank 2 Apples 150 3 3 Bananas 200 1 4 Cherries 120 4 5 Dates 200 1 6 Elderberries 90 5
What does the RANKX function do in Power BI?
Which of the following is the correct syntax to rank sales by product using RANKX?
RANKX(____, [Sales])
Given the following measure:
Rank Sales = RANKX(ALL(Products), [Total Sales], , DESC, Dense)
Identify the error in this RANKX formula:
Rank = RANKX(Products, [Sales], , ASC)
You want to rank products by sales but treat ties by assigning the same rank and skipping ranks after ties (standard competition ranking). Which RANKX parameter should you use?
Pass the test and this pattern moves unknown