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
I have table Company. I need to display the TOP 6 recently created. Exemple of data:
Expected results
What I tried :
Rank =
VAR d = Companies[CreatedDate].[Date]
RETURN
CALCULATE (
RANK.EQ ( d, Companies[CreatedDate], DESC)
)
the calculated column returned wrong values:
I need to order by creatd date, and when it's the same date, I need to order by Company Name
How to correct it
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @Anonymous ,
You can also try this:
Measure =
RANKX (
ALLSELECTED ( 'Table' ),
RANKX (
ALLSELECTED ( 'Table' ),
CALCULATE ( MAX ( 'Table'[Created Date] ) ),
,
DESC,
DENSE
) * 100
+ RANKX (
ALLSELECTED ( 'Table' ),
CALCULATE ( MAX ( 'Table'[Company Name] ) ),
,
DESC,
DENSE
),
,
ASC,
DENSE
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can also try this:
Measure =
RANKX (
ALLSELECTED ( 'Table' ),
RANKX (
ALLSELECTED ( 'Table' ),
CALCULATE ( MAX ( 'Table'[Created Date] ) ),
,
DESC,
DENSE
) * 100
+ RANKX (
ALLSELECTED ( 'Table' ),
CALCULATE ( MAX ( 'Table'[Company Name] ) ),
,
DESC,
DENSE
),
,
ASC,
DENSE
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
You may download my PBI file from here.
Hope this helps.
@Anonymous Hmm. Well, you could try out the different options for RANKX instead of RANK.EQ. Provides some additional options around breaking ties and the like:
https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
Also might try something like the Mythical DAX Index:
https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Mythical-DAX-Index/m-p/1093214#M528
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |