Forum Discussion
Ranking a specific value in a table
- 1 year ago
Hi,
The RANK() function should help. Share the download link of the PBI file.
Hello Creative_tree88
Try this DAX code
ABC Limited Rank =
VAR SelectedCompany = "ABC Limited"
VAR RankedTable =
ADDCOLUMNS(
VALUES('Company Performance'[Company Name]),
"PerformanceValue",
DIVIDE(
CALCULATE(SUM('Company Performance'[Customers waiting within 6 weeks])),
CALCULATE(SUM('Company Performance'[Total number of Customers]))
)
)
VAR CompanyRank =
RANKX(
RankedTable,
[PerformanceValue],
,
DESC, -- Higher performance ranks better
DENSE
)
RETURN
CALCULATE(
CompanyRank,
'Company Performance'[Company Name] = SelectedCompany
)
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
pankajnamekar25 - thank you. However, I'm getting the following error message:
The value for 'PerformanceValue' cannot be determined. Either the column doesn't exist, or there is no current row for this column.
Any ideas?
- Ashish_Excel1 year ago
Solution Supplier
Hi,
The RANK() function should help. Share the download link of the PBI file.