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:
Phil_Seamark
9 years agoMicrosoft Employee
You could try this approach. It might work so let me know how you get on
This Col Might work = CALCULATE( COUNTROWS('Opportunities'),
FILTER(
ALL('Opportunities'),
'Opportunities'[_ownerid_value]=EARLIER('Opportunities'[_ownerid_value])
&& 'Opportunities'[Expected Annual Revenue] < EARLIER('Opportunities'[Expected Annual Revenue])
))+1