DAX RankX Troubleshooting with PowerPivot

TopCase

New Member
Joined
May 17, 2018
Messages
4
Hello,

I am having issues using the RANKX function in my PowerPivot data model. I am trying to rank two different metrics by region, territory: sales and growth from last year. The sales rank works perfectly, but the growth rank seems to skip a rank when growth turns from positive to negative. I am thinking maybe RANKX does like crossing zero when there isn't an actual zero value present. Has anyone seen this before and have any tips? Any help will be greatly appreciated. I also have a picture linked below. Thanks!

Here are my measures:

Sales1 = CALCULATE(SUMX('TableX','TableX'[Sales1]))
Sales2 = CALCULATE(SUMX('TableX','TableX'[Sales2]))
Growth = [Sales2] - [Sales1]

Sales Rank =IF(HASONEVALUE('TableX'[Terr]),RANKX(ALL('TableX'[Terr]),[Sales1],,,dense),BLANK())
Growth Rank = IF(HASONEVALUE('TableX'[Terr]),RANKX(ALL('TableX'[Terr]),[Growth],,,dense),BLANK())

Image Example
fch4Jo
https://ibb.co/fch4Jo
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,216,108
Messages
6,128,872
Members
449,475
Latest member
Parik11

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