Forum Discussion
Romani
Helper II
2 years agoTOP Achiever Analysis
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 kn...
Romani
Helper II
2 years agoRanking Select = IF(
HASONEVALUE('Ranking Selection'[Ranking]),
VALUES('Ranking Selection'[Rank Number]),
0
)
here is my ranking select
Ranking Rank Number
and this my seperated table for the ranking selection
and this the formula of AVG Ros:
here is my ranking select
Ranking Rank Number
| Top 3 | 3 |
| Top 5 | 5 |
| Top 10 | 10 |
and this the formula of AVG Ros:
Avg ROS = AVERAGE('My Table'[Return on Sales (ROS)])
BeaBF
Super User
2 years ago- Romani2 years ago
Helper II
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:
- Client D (14.53%)
- Client B (8.05%)
- Client C (0.89%)
- Client A (-0.38%)
- Client F (-0.69%)
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:RANKX(ALL('Credit Benchmarking'[Customer Name]), [Avg ROS], , DESC,Dense)- BeaBF2 years ago
Super User
Romani Ok, here my measures to correctly rank Clients as in your output:
Avg ROS = SELECTEDVALUE('Credit Benchmarking'[ROS.3])Customer ROS Rank =RANKX(ALL('Credit Benchmarking'[Customer Name]),[Avg ROS],,DESC,DENSE)as you can see:So, modify the AVG ROS.
BBF
- Romani2 years ago
Helper II
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 DAXCustomer ROS Rank =RANKX(ALL('Credit Benchmarking'[Customer Name]),[Avg ROS],,DESC,DENSE) it deleting the rank selection