Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I have a column with numbers and some of the rows contain "K" value next to the number. for example: 23.5K.
I want to convert the number to be 235000 instead. please help.
Solved! Go to Solution.
Hi @Anonymous ,
Try this in a new custom column:
if Text.EndsWith(Text.From([Expenses]), "K")
then Number.From(Text.Start([Expenses], Text.Length([Expenses]) - 1)) * 1000
else [Expenses]
If you want to do this transformation in-column, rather than creating a new one, you could add a replace values custom step instead, something like this:
Table.ReplaceValue(
previousStep,
each [Expenses],
each if Text.EndsWith(Text.From([Expenses]), "K")
then Number.From(Text.Start([Expenses], Text.Length([Expenses]) - 1)) * 1000
else [Expenses],
Replacer.ReplaceValue,
{"Expenses"}
)
Pete
Proud to be a Datanaut!
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrE0tjDRMzJWitWJVjI21bNU8AYzDc31DIyylWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Exp = _t]),
#"To Num" = Table.AddColumn(Source, "Num", each if Text.Contains([Exp], "k", Comparer.OrdinalIgnoreCase) then Expression.Evaluate(Text.Select([Exp], {"0".."9","."}) & "*1000") else Number.From([Exp]))
in
#"To Num"
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi @Anonymous ,
Try this in a new custom column:
if Text.EndsWith(Text.From([Expenses]), "K")
then Number.From(Text.Start([Expenses], Text.Length([Expenses]) - 1)) * 1000
else [Expenses]
If you want to do this transformation in-column, rather than creating a new one, you could add a replace values custom step instead, something like this:
Table.ReplaceValue(
previousStep,
each [Expenses],
each if Text.EndsWith(Text.From([Expenses]), "K")
then Number.From(Text.Start([Expenses], Text.Length([Expenses]) - 1)) * 1000
else [Expenses],
Replacer.ReplaceValue,
{"Expenses"}
)
Pete
Proud to be a Datanaut!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 4 | |
| 4 | |
| 4 |