Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I am trying to change this column to a data type number. The values are numbers, I've trimmed the values but whenever I try to convert to number, it still throws an error.
Hi @clk245 ,
There doesn't seem to be a problem with the code provided.
If the data source is .xls file, try saving it as .xlsx and try again.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
create a new column and write the following formula
Number.From(
Text.Select([ON HAND QUANTITY],{"0".."9"}))
Do you have a sample of what's in that column at source?
I made sure that the column also was in the number format as well.
You're doing everything right. I just threw in the same data to a .pbix and it auto-detected and converted the columns to number. The only thing I can lastly suggest is removing the Trimmed Text and Replaced Value applied steps
Hard to see what might be the issue but the error message is pointing to the zero being the issue (could be everything to be honest, it's probably just flagging that as it's the first in the list).
I take it you've tried to convert to number without trimming first - not sure why you would need to do this. Otherwise generally this error would flag up when there's perhaps a bit of text in the column or something like a #N/A
Yep, I've tried converting without trimming, I've tried replacing values and trying to find any erronious values or text.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
31 | |
30 | |
23 | |
14 | |
10 |
User | Count |
---|---|
23 | |
21 | |
16 | |
10 | |
9 |