Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have an issue I couldn't solve because I have negative values in my data, and the DAX below cannot rank it. For example, when ranking the ROS KPI and choosing the top 5, it shows only 4. I don't know why. Here is a sample of my data:
Year | Customer Name | ROS
2022 | Client A | -0.38%
2022 | Client B | 8.05%
2022 | Client C | 0.89%
2022 | Client D | 14.53%
2022 | Client E | -3.55%
2022 | Client F | -0.69%
Top Avg ROS by Rank =
VAR RankingDimension = VALUES('Credit Benchmarking'[Customer Name])
VAR RankingSelect = [Ranking Select]
RETURN CALCULATE( [Avg ROS], FILTER( RankingDimension, RANKX(ALL('Credit Benchmarking'[Customer Name]), [Avg ROS], , DESC,Dense) <= RankingSelect ))
Can you help me resolve this issue?
Solved! Go to Solution.
@Romani ok, can you share the pbix file or some sample data on which you are calculating this?
Sample data - expected output.
BBF
| Top 3 | 3 |
| Top 5 | 5 |
| Top 10 | 10 |
I have a problem with ranking negative values in my data using DAX. Here is an example of my data:
Year Customer Name ROS
| 2022 | Client A | -0.38% |
| 2022 | Client B | 8.05% |
| 2022 | Client C | 0.89% |
| 2022 | Client D | 14.53% |
| 2022 | Client E | -3.55% |
| 2022 | Client F | -0.69% |
I want to rank the customers based on their ROS for the year 2022. The correct ranking should be:
However, my dashboard is only showing 4 customers when I select the top 5. How can I fix this so it shows all 5 customers correctly, including the ones with negative values?
i Think the problem with my dax especially the below part:
@Romani Ok, here my measures to correctly rank Clients as in your output:
So, modify the AVG ROS.
BBF
to undestand well i have slicer for top achiever
when iam chosing the top 5 as the above picture, the output is that showing me only top 4:
when iam pasting your DAX
@Romani Ok, Clear. So we need to modify the logica.
Instead of a measure, calculate this new column and put it as tooltip on your visual:
If you send me your email, i can send you my pbix example file.
BBF
romani.adel93@gmail.com
Sent! Let me know.
BBF
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |