Forum

Power Query data fr...
 
Notifications
Clear all

Power Query data from the WEB

9 Posts
3 Users
0 Reactions
52 Views
(@dieneba)
Posts: 50
Trusted Member
Topic starter
 

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

 
Posted : 04/02/2023 3:43 pm
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 04/02/2023 7:46 pm
(@dieneba)
Posts: 50
Trusted Member
Topic starter
 

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.

 
Posted : 05/02/2023 3:36 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Dieneba,

Can you please share your Excel file that has the error?

Mynda

 
Posted : 05/02/2023 9:29 pm
(@dieneba)
Posts: 50
Trusted Member
Topic starter
 

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

 
Posted : 06/02/2023 6:51 am
Riny van Eekelen
(@riny)
Posts: 1185
Member Moderator
 

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?

 
Posted : 06/02/2023 7:28 am
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 06/02/2023 9:11 pm
(@dieneba)
Posts: 50
Trusted Member
Topic starter
 

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

 
Posted : 07/02/2023 4:51 am
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 07/02/2023 6:51 pm
Share: