Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
This is my very first post here in the community, so I hope I'm doing it in the right way 🙂
I need some help with creating a dax formula for the table "Commodity" , that shows the rank for "Physical Commodity" based on the "Contracted Quantity", ignoring the impact of the "Date", like below:
"Contracted Quantity" is a measure, and "Date" and "Physical Commodity" are part of different tables.
Can you give me some suggestions?
Thanks
hi, @Anonymous
try below measure
@Dangar332 @Jihwan_Kim thanks for trying.
I manage to solve it with Calculate and All functions.
Have a nice day!
hi, @Anonymous
adjust your table name
try below one
result =
var a = SUMMARIZECOLUMNS('physical commodity'[physical commodity],"cont commodity",[contracted commodity])
var b = SELECTCOLUMNS(a,"rankcomparing",[cont commodity])
return
rankx(b,[rankcomparing],[Contracted Quantity])
'physical commodity' -- is your table name so adjust it .
[Contracted Quantity] -- is your measue
Hi @Dangar332,
[contracted commodity] from variable "a", I believe should be "contracted quantity", right?
In the form with "contracted quantity" the formula does not show anything 😞
Thanks
Hi,
Please check the below picture and the attached pbix file.
Contract Qty: =
SUM( sales[Contracted Quantity] )
Ranking by physical commodity =
RANK (
SKIP,
ALL ( 'Physical Commodity'[Physical Commodity] ),
ORDERBY ( [Contract Qty:], DESC )
)
Hi @Jihwan_Kim ,
Thanks for the suggestion, but it does not work 😞
If I add "Date" to the the table it's messing up with the rank.
Thanks,
Georgiana
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 21 | |
| 10 | |
| 8 | |
| 8 |