Forum Discussion
cruncher
Helper II
1 year agoRankx function is behaving weird when used in table with extra columns and Slicers
Hi Experts. I am having a hard time understanding dax evaluation context in Rankx function. I want to rank the customers based on sales. These are the steps I have followed. Step 1: Creating ...
- 1 year ago
Hi cruncher ,
Can you try with below dax measure attaching the screenshot for your reference.
Customer_Rank 3 = RANKX( FILTER( ALLSELECTED(Sales), Sales[Rank Source] = "Yes" && Sales[Source] IN VALUES(Sales[Source]) ), CALCULATE(SUM(Sales[Sales])), , DESC, DENSE )Regards,
Chaithanya.
v-kathullac
Community Support
1 year agoHi cruncher ,
can you check with below mentioned measure and let us know if you need any further assistance. for your reference am attaching a screenshot as well.
Customer_Rank 1 =
VAR SelectedStatus = VALUES(Sales[Status])
RETURN
RANKX(
FILTER(
ALLSELECTED(Sales),
Sales[Rank Source] = "Yes" &&
Sales[Source] IN VALUES(Sales[Source]) &&
Sales[Status] IN SelectedStatus
),
CALCULATE(SUM(Sales[Sales])),
,
DESC,
DENSE
)
Regards,
Chaithanya..
cruncher
Helper II
1 year agoThanks for trying but it still not giving correct rank.
- v-kathullac1 year ago
Community Support
Hi cruncher ,
Can you try with below dax measure attaching the screenshot for your reference.
Customer_Rank 3 = RANKX( FILTER( ALLSELECTED(Sales), Sales[Rank Source] = "Yes" && Sales[Source] IN VALUES(Sales[Source]) ), CALCULATE(SUM(Sales[Sales])), , DESC, DENSE )Regards,
Chaithanya.
- cruncher1 year ago
Helper II
Thanks v-kathullac It is working as expected. Much appreciated for your effort.