Forum Discussion
Value Function cutting off my data
I have a column of type Text which contains both text and numeric entries. For example, one entry is "BBB" and another is "0.015421564"
I want to create a new column of decimal type to extract the numeric values from this column, but the VALUE() function is not maintaining all of the decimal places and I need to keep it as precise as possible.
Any suggestions?
Anonymous in PQ change the column type to decimal number and you will see the error where the value is text, and in the next step, replace error with null value and that will do it.
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
7 Replies
- parry2kSuper User
Anonymous in PQ change the column type to decimal number and you will see the error where the value is text, and in the next step, replace error with null value and that will do it.
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- parry2kSuper User
Anonymous it will be easier if you strip off alphabets in the power query and then keep the number only and keep the decimal value. Do you have a pattern of how the values are stored in this column?
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- AnonymousNot applicable
parry2k I'm not sure what you mean by pattern.
- AnonymousNot applicable
- parry2kSuper User
Anonymous how does the value look like in this column? Can you paste some sample data?
- parry2kSuper User
Anonymous seems like some rows have text values and others have numbers but none of the rows contains text & numbers, is this correct?
- AnonymousNot applicable
That is correct