Hi Mynda
I tried to collect the table from the web. I got an error message when I changed the text to decimal format (DataFormat.Error : Désolé... Nous ne pouvons pas procéder à la conversion en un nombre.
Détails : -45.00
Any ideas why?
I used the same link you did https://markets.ft.com/data/league-tables/tables-and-trends/Bonds
Hi Dieneba,
I suspect you missed the step where you replace minus ( - ) signs with blanks before changing the data type to decimal.
BTW, I've moved this post to our Power Query Course members forum rather than the public Power Query forum so that you get priority responses. Please be sure to use the course members forum going forward.
Mynda
Hi Mynda
I tired again but I do not have any hyphen as per the course example in my data. I tried attempted a replace -(space) by - without space, same for hte +sign and it changes nothing. I outlined the process I used one by one. I do not understand where the error comes from.
Hi Dieneba,
Can you please share your Excel file that has the error?
Mynda
Hi Minda
On the sheet table 1 (Equity) I did not change anything
On the sheet talbe 2 (Bond) I removed the column and removed the % sign
Thanks
Dieneba
See if you can work with the attached file. I created a new query to the Bonds URL from your initial post. I'm working on a PC that has the UK number formats as a default and I can transform the texts to numbers without problems.
Your system probably doesn't like to see 1,519.22 or -49.00%. I presume it requires 1.519,19 and -49,00%
To overcome that problem, you need to transform the text columns to numbers "using locale" and specify that you want it to be a decimal number or a percentage based on the UK (or US) format. PQ then adds a bit at the end of the step indicating which locale to use. In this example it added "en-GB" telling PQ to use the UK number formatting rules to translate the texts to numbers in the format your system want it.
Does this work for you?
Hi Dieneba,
Thanks for sharing your file. Riny is correct, this is most likely a locale issue. You need to use Change Type Using Locale as explained in lesson 4.02 of the Power Query course.
Let me know if you're still stuck.
Mynda
Hi Mynda and Riny
Thanks a million. The issue with me is that I learn one chapter at the time until I fully understand what I am doing before I move to the next one. I did not even think that the number format could be the issue:)
Thanks again, now I understand and I can move on to the next one
Best
Dieneba
That's the correct way to learn, but sometimes due to regional settings we need to use other techniques, so don't be afraid to reach out if you get stuck. We're happy to help