Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have text values in one column containing values like $2.5M and $4.5B . I have to convert this column into numerical column so that I can do calculation on this . Please provide solution
Solved! Go to Solution.
@Aman_ create this column in DAX:
Column =
VAR _factor = RIGHT(Table1[Column1])
VAR _number = VALUE(LEFT(Table1[Column1], LEN(Table1[Column1]) - 1 ))
VAR _result =
SWITCH(
TRUE(),
_factor = "B", _number * 1000000000,
_factor = "M", _number * 1000000
)
RETURN
_result
In case it solved your question, pleasw accept this as a solution. Appreciate your Kudos.
@Aman_
Power Query: replace all the characters that are no digits with nothing.
Than change the type of the column from TEXT to whole number or currency and upload to the model.
You can always format them with $ again in the model.
Hi
Thank you for your reply , In column Some values are given in M (Million) and Some in given as B (Billion) like 2.5M , 1.5B, 7.0M . How to deal with this and convert into single format say thousand
@Aman_ create this column in DAX:
Column =
VAR _factor = RIGHT(Table1[Column1])
VAR _number = VALUE(LEFT(Table1[Column1], LEN(Table1[Column1]) - 1 ))
VAR _result =
SWITCH(
TRUE(),
_factor = "B", _number * 1000000000,
_factor = "M", _number * 1000000
)
RETURN
_result
In case it solved your question, pleasw accept this as a solution. Appreciate your Kudos.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
143 | |
104 | |
103 | |
82 | |
70 |