Im tripping up on a simple RANKX or pivot table rank function with dax. help?

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
161
Hello everyone,

Im having a heck of a time getting a rank function within my pivot table to work for my purposes.

I have just one master table this is working off. It is a table of an item assortment going to about 100 locations, and its about 900 or so items. So in other words, REPEATED locations, and REPEATED items, and all their sales data. Just a condensed hypothetical example so we're on the same page:
skudescriptionsite numbersales units this year
1234abc1018521
1234abc1026325
456ced10112
456ced1021212
456ced103121
7890def1018787
7890def1021212
7890def1031212

When I start to pivot this data though, and seek out a rank, it starts to get weird when adding multi-level fields to my pivot. I know Im messing up something with the filter context.

Here is a snip of what I have. Column C is a measure, which is a sum of my field "sold in last 12 mos"

Column D is using the built in "show values as RANK" function of the pivot table, using the measure created above. In other words, this is not from a measure actually calculating a rank, as you probably know. My dilemma is how can I get this using RANKX, when we're dealing with a source table that has a bunch of repeating values such as the items and category descriptors?

Column E is a dax measure, where i was fussing with using "ALL" but that just gave me weird values. My goal was to provide two things here:

1)show a rank on the pivot table WITHIN the parent "category" i.e. here its "TACTICAL HOLSTERS"
2)show a rank on the pivot table in the context of ALL items (what i was driving at with column E)

Can anyone help? How can you employ RANKX when youve got repeated values in a single big flat table?

1654192507950.png
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,224,817
Messages
6,181,147
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top