Solved

RANK X - Rank products by revenues - Powerpivot (DAX)

Posted on 2016-07-29
6
83 Views
Last Modified: 2016-07-29
Attached is a spreadsheet containing a sales transactions table. On the sales by part sheet you will see I have created a simple pivot table from a PowerPivot model. I would like to create a measure that will rank the part codes by revenue.

Can anyone help me with a measure and explain the basic logic behind it.

I am novice with DAX but would like to learn more so the logic helps.

Thanks
Mike
0
Comment
Question by:mikes6058
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41734523
HI Mike - no attachment.
0
 

Author Comment

by:mikes6058
ID: 41734527
Sorry Rob
trans_B.xlsx
0
 
LVL 33

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 41734532
In your pivot you can simply drag the salestotal into the value field again and then change the settings on the second occurence to show Rank.

In the Field List Navigation pane. Drag SalesTotal to the bottom right pane. Click on the drop-down option for the second occurrence and choose Value Field Settings. Partway down the window there are two page tabs, choose "Show Values As".  Then choose the drop-down list just below the tabs. In this list there are a couple of options for Rank, Small to large and Large to Small. Large to Small will rank the highest value as number 1.

Thanks
Rob H
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:mikes6058
ID: 41734545
Thanks Rob,

This would work in this isolated scenario however going forward I would like to be able to view rankings by sub groups.

For example number 1 and 2 rank for a particular product group.

Would you be able to provide the DAX solution?

I'm also working towards a solution similar to the one explained in the link below.

 http://www.powerpivotpro.com/2014/11/displaying-top-n-bottom-n-and-all-others/

Mike
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41734555
Sorry, don't know anything about DAX.
0
 

Author Closing Comment

by:mikes6058
ID: 41734561
No problem, points for the alternative solution.

btw, I will be posting a number of other questions that won't involve DAX

Mike
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question