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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have very simple measure contains SUM of numbers. The result of this measure is standard number e.g. 1 2,3,4,....59,..... etc.
It is possible to recreate this measure to showing ordinary numbers like 1st, 2nd....21th etc?
Thank you for your help
Solved! Go to Solution.
Based on your needs, I have created the following table.
Then you can use the following Dax to get the result you want:
Ordinal Numbers =
VAR _Last2Number = RIGHT( [Standard number], 2 )
VAR _LastNumber = RIGHT( [Standard number], 1 )
RETURN
[Standard number]&SWITCH( TRUE( ),
_Last2Number IN { "11", "12", "13" }, "th",
_LastNumber = "1", "st",
_LastNumber = "2", "nd",
_LastNumber = "3", "rd",
"th"
)
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Based on your needs, I have created the following table.
Then you can use the following Dax to get the result you want:
Ordinal Numbers =
VAR _Last2Number = RIGHT( [Standard number], 2 )
VAR _LastNumber = RIGHT( [Standard number], 1 )
RETURN
[Standard number]&SWITCH( TRUE( ),
_Last2Number IN { "11", "12", "13" }, "th",
_LastNumber = "1", "st",
_LastNumber = "2", "nd",
_LastNumber = "3", "rd",
"th"
)
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks a lot, it works perfect!
If you mean ordinal numbers then unfortunately there isnt an inbuilt function in DAX.However you can have a look at this article on possible ways on how to achieve it
https://gorilla.bi/power-bi/ordinal-numbers/