March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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.
Purchase Amount | rank | Vendors |
$20.00 | 2 | A |
$95.75 | 4 | B |
$268.00 | 8 | C |
$197.44 | 8 | D |
$207.00 | 8 | E |
$363.00 | 11 | F |
Solved! Go to Solution.
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] )
Now, looking at your sample data, why arent you using $ PO Amount in your table and is Purchase Amount aggregated?
Proud to be a Super User!
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.
Hi,
Share the download link of the PBI file and show the problem there clearly.
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
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] )
Now, looking at your sample data, why arent you using $ PO Amount in your table and is Purchase Amount aggregated?
Proud to be a Super User!
User | Count |
---|---|
120 | |
78 | |
58 | |
52 | |
46 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |