Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I am looking for the DAX formula which allows to calculate the rank of an Id according to its decreasing Qty value by date: example in attachment ... either in a calculated column, or by a measure. Can you help me?
Solved! Go to Solution.
Try this:
Rank =
VAR __date =
SELECTEDVALUE ( 'Table'[Date] )
RETURN
IF (
HASONEVALUE ( 'Table'[id] ),
RANKX (
ALL ( 'Table'[Date], 'Table'[id] ),
CALCULATE ( SUM ( 'Table'[qty] ), 'Table'[Date] = __date )
)
)
Proud to be a Super User!
Try this:
Rank =
VAR __date =
SELECTEDVALUE ( 'Table'[Date] )
RETURN
IF (
HASONEVALUE ( 'Table'[id] ),
RANKX (
ALL ( 'Table'[Date], 'Table'[id] ),
CALCULATE ( SUM ( 'Table'[qty] ), 'Table'[Date] = __date )
)
)
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |