Forum Discussion
kfinn
9 years agoFrequent Visitor
RANKX- Rank By User
Hi Everyone- I am new to DAX and I have read a handful of blogs on RANKX, but I still can't figure out what I am doing wrong on the below scenario: I want to create a column that ranks user's o...
- 9 years ago
How about this?
Owner Opportunity Rank = RANKX ( ALL ( opportunities[Opportunity Name] ), CALCULATE ( SUM ( opportunities[Expected Annual Revenue] ), ALLEXCEPT ( opportunities, opportunities[_ownerid_value], opportunities[Opportunity Name] ) ) )EDIT: You want to Rank the Opportunity Names for each Owner!
I think that's what you meant? :smileyhappy:
Sean
Community Champion
9 years agoHow about this?
Owner Opportunity Rank =
RANKX (
ALL ( opportunities[Opportunity Name] ),
CALCULATE (
SUM ( opportunities[Expected Annual Revenue] ),
ALLEXCEPT (
opportunities,
opportunities[_ownerid_value],
opportunities[Opportunity Name]
)
)
)
EDIT: You want to Rank the Opportunity Names for each Owner!
I think that's what you meant? :smileyhappy:
kfinn
9 years agoFrequent Visitor
Yes- This is what I am looking for. I am not following how DAX is grouping by the _ownerid_value but now that I have the acceptable solution, I can play around with it. Much thanks to you!!