Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
I have an issue converting data type from text to decimal point while maintaining the leading zero where applicable.
The column on the left is the original data, and the column on the right is after I converted it to the decimal point.
As you can see
Because of this, I have a duplicate rank, which is supposed to be different.
How can I keep the trailing zero, where applicable, after converting to a decimal point? And I need the data type as a decimal point.
Thanks
Solved! Go to Solution.
BigKev,
If you need 5.9 to come before 5.10, then you need to transform your 5.9 to 5.09 (assuming they'll only ever be a maximum of two decimal places) before converting it to a decimal place, then show two decimal places in your column.
From the query editor, go back to in your steps to before you added the column, click Add Column > Column From Examples, then work with that until you're satisfied with the transformation. Then you can convert that new column to a number. At this point, click Close & Apply.
If you want to see two decimal places, you can do that from the column tools once the data is loaded.
Hope that helps!
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI issue? Feel free to hire me on Upwork or to DM me on here to discuss how we can make your problems disappear. 😄
Proud to be a Super User! | |
BigKev,
If you need 5.9 to come before 5.10, then you need to transform your 5.9 to 5.09 (assuming they'll only ever be a maximum of two decimal places) before converting it to a decimal place, then show two decimal places in your column.
From the query editor, go back to in your steps to before you added the column, click Add Column > Column From Examples, then work with that until you're satisfied with the transformation. Then you can convert that new column to a number. At this point, click Close & Apply.
If you want to see two decimal places, you can do that from the column tools once the data is loaded.
Hope that helps!
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI issue? Feel free to hire me on Upwork or to DM me on here to discuss how we can make your problems disappear. 😄
Proud to be a Super User! | |
Have you tried formatting the Custom column as text in PowerQuery?
Hi @BigKev
Is it possible to change numbers like 7.1 to 7.01? This will then keep it's numerical sort
Joe
Proud to be a Super User! | |
Date tables help! Learn more
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
84 | |
69 | |
68 | |
39 | |
39 |