cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

RankX not correct with measure for average sales

I am trying to RankX the regional manager of each team; however, manager have different size teams and hence higher sales. What I am trying to do is average out their sales / headcount and rank that; however, I am running into several spots when filtering by the month that some of the rankings are out of order, see pics. Any help is much appreciated. 

 

Dhutch909_0-1593127037563.png

Dhutch909_1-1593127078545.png

Dhutch909_2-1593127133367.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: RankX not correct with measure for average sales

@harshnathani @amitchandak 

 

I have it figured out. I am pulling head count from an employee table and order values from an order table for the average. I had to change the relationship on my tables to filter both. Previously the employee table was filtering the order table. 

View solution in original post

5 REPLIES 5
Highlighted
Super User IX
Super User IX

Re: RankX not correct with measure for average sales

@Dhutch909 , I can see a change in measure calculation when it has been used in Rank. Measure Rank is sensitive to context.Please use exact same measure at both places and check

 

Also For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Super User V
Super User V

Re: RankX not correct with measure for average sales

Hi @Dhutch909 ,

 

 

RANK =
RANKX (
    ALLSELECTED ( 'Service Territory'[Regional Manager] ),
    [Reg-Order Average]
)

 

Regards,

Harsh Nathani

Highlighted
Frequent Visitor

Re: RankX not correct with measure for average sales

@harshnathani  This resuts in The end of the inpt was reached, error. 

 

Dhutch909_0-1593173852765.png

 

Highlighted
Frequent Visitor

Re: RankX not correct with measure for average sales

@amitchandak  I am not 100% sure what you mean? The Reg - Order Average uses the number of employees for each manager to get an average and then the Rankx compares the managers averages against each other. Is something wrong with that?

Highlighted
Frequent Visitor

Re: RankX not correct with measure for average sales

@harshnathani @amitchandak 

 

I have it figured out. I am pulling head count from an employee table and order values from an order table for the average. I had to change the relationship on my tables to filter both. Previously the employee table was filtering the order table. 

View solution in original post

Helpful resources

Announcements
Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Upcoming Events

Community Summit North America – Join Online!

Join this community-driven Power Platform digital event for unbiased support and problem-solving.

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Top Solution Authors
Top Kudoed Authors