Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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/
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |