Forum Discussion
Gross Profit - Measure - with wrong context
- 1 year ago
Hi DennisSchlein ,
Thank you for reaching out to the Microsoft Community Forum.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.Thank you
Try the RANK function. It's generally preferred over RANKX. You'll need to specify each column in the visual; this example assumes that the second column in the visual is CustomerName.
Customer GP Rank - TOP 10 =
RANK (
DENSE,
ALLSELECTED ( 'MDS CG1'[CustomerGroupName], 'MDS CG1'[CustomerName] ),
ORDERBY ( [Gross Profit] ),
DESC
)
https://www.sqlbi.com/articles/introducing-the-rank-window-function-in-dax/