Earn recognition and rewards for your Microsoft Fabric Community contributions and become the hero our community deserves.
Learn moreBecome a Certified Power BI Data Analyst! Prepare for Exam PL-300 with expert-led live sessions. Get registered!
I have a Sales table with a unit price column (Decimal number values). When I import this CSV file in Power BI Desktop and change the data type from ABC Text to Decimal number the unit price column’s original value is changed i.e. original price 3.2 is changed into 32. When I change it back to ABC Text, the correct value (i.e. 3.2) is displayed. But I cannot store numbers in text format right. I want to convert the value 32 into 3.2.
I have attached the image for reference. The left side of the image displays the unit price with the right values but with the wrong data type (ABC). (On Right side of the image) But when I change the datatype to a Decimal number the right values i.e. 3.2 are getting altered to 32. Can someone please tell me how to fix this?. Thank you.
Solved! Go to Solution.
Hi @VivekDI
Your system probably has comma's as decimal seporator instead of periods.
3 ways to solve this when dealing with US style data.
1. you could use the replace values option on the transform tab in Power Query to replace periods with comma's before changing the data type.
2. When changing the datatype choose the locale option and then say its a decimal but with united states formatting. (This option is very helpfull when importing dates with mm/dd/yyyy format into a system with diferent settings.
3. Change the settings of your machine. But this will effect al lot of other programs as well.
Best regards,
Jeroen Dekker
THAT SOLUTION OF CHANGING PERIODS TO COMMAS WORKED FOR ME.
NOW I HAVE THE PROBLEM OF NEGATIVE VALUES. CONVERTING THEM FROM TEXT TO DECIMAL BRINGS ME AN ERROR MESSAGE.
Hi @VivekDI
Your system probably has comma's as decimal seporator instead of periods.
3 ways to solve this when dealing with US style data.
1. you could use the replace values option on the transform tab in Power Query to replace periods with comma's before changing the data type.
2. When changing the datatype choose the locale option and then say its a decimal but with united states formatting. (This option is very helpfull when importing dates with mm/dd/yyyy format into a system with diferent settings.
3. Change the settings of your machine. But this will effect al lot of other programs as well.
Best regards,
Jeroen Dekker
Hi, @jeroendekk as per your suggestion I used the locale option while changing the datatype and it worked. Thanks a lot for your help. 👍
User | Count |
---|---|
80 | |
68 | |
56 | |
53 | |
47 |
User | Count |
---|---|
52 | |
49 | |
39 | |
32 | |
32 |