Solved

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

Posted on 2016-07-29
6
78 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

732 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