Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kunalkawalee
New Member

Rank is getting Skipped

Hi , 

I am trying to create a vendor Rank based on the purchase order amount. 

which would be dynamic based on the date filter selected. 
This is the dax I am using. 

VendorRank =
Rankx(all('Dim Vendors'),[$ PO Amount],,ASC,Dense)

but its is skipping the ranks. 

for example :- 

Purchase AmountrankVendors
$20.002A
$95.754B
$268.008C
$197.448D
$207.008E
$363.0011F

can anybody please help me why is this happening and how to resolve this. ?
1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @kunalkawalee 

Since you're using Dim Vendors, I am assuming there is a separate  fact table which $ PO Amount is based on and each vendor has a single record in the Dim Vendors table.

Rank Test = 
RANKX ( ALL ( 'Dim Vendors' ), [PurchaseAmount],, ASC, DENSE )

PurchaseAmount = 
SUM ( Purchases[PurchaseAmount] )

 

danextian_0-1733230479628.png

Now, looking at your sample data, why arent you using $ PO Amount in your table and is  Purchase Amount aggregated?










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
ahmedoye
Responsive Resident
Responsive Resident

This mostly depends on what is in the measure [$PO Amount]. So you will need to check other alternatives to write the same measure and see if it solves the problem.

 

If this answer works for you, kindly mark as solution so others with similar issues can easily find the solution.

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file and show the problem there clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-xinruzhu-msft
Community Support
Community Support

Hi @kunalkawalee 

Did thr solution danextian  offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to, or if you have other problems , you can offer some information so that can provide more suggestion for you.

 

Best Regards!

Yolo Zhu

danextian
Super User
Super User

Hi @kunalkawalee 

Since you're using Dim Vendors, I am assuming there is a separate  fact table which $ PO Amount is based on and each vendor has a single record in the Dim Vendors table.

Rank Test = 
RANKX ( ALL ( 'Dim Vendors' ), [PurchaseAmount],, ASC, DENSE )

PurchaseAmount = 
SUM ( Purchases[PurchaseAmount] )

 

danextian_0-1733230479628.png

Now, looking at your sample data, why arent you using $ PO Amount in your table and is  Purchase Amount aggregated?










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.