Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vrossouw
Helper III
Helper III

Yahoo finance - There weren't enough elements in the enumeration to complete the operation.

Good day, I see there are some responses with regards to this error. But I don't see anything relating to Yahoo Finance.

Will you be able to assist, please?

 

I have various connections to stock history. For example.

https://finance.yahoo.com/quote/DSY.jo/history/

 

When I refresh my connections, I get this error :

There weren't enough elements in the enumeration to complete the operation.

(It is not an error on the same stock ticker.)

 

This is the advanced editor info:

 

let
Source = Web.Page(Web.Contents("https://finance.yahoo.com/quote/DSY.jo/history/")),
Data2 = Source{2}[Data],
Decimal = Table.ReplaceValue(Data2,",","",Replacer.ReplaceText,{"Open", "High", "Low", "Close*", "Adj Close**", "Volume"}),
#"Filter Dividend" = Table.SelectRows(Decimal, each not Text.Contains([Open], "Dividend")),
#"Replace - volume" = Table.ReplaceValue(#"Filter Dividend","-","0",Replacer.ReplaceText,{"Volume"}),
#"Volume Whole Number" = Table.TransformColumnTypes(#"Replace - volume",{{"Volume", Int64.Type}})
in
#"Volume Whole Number"

 

Will you be able to assist please?

 

 

 

 

 

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi @vrossouw 

using you code I got the complet table of values. And also the following transformation work well.

 

I suggest you to retry and if you get some error to check at wich point the problem raises.

You should delete the last step check if you have the problem. If yes delete the current last step check and so on ...

and let we know

 

Hi

There isn't an error with the specific query.

The error happens when I refresh all the queries, about 50 at a time.

Then it is on any stock 'ticker'.

Anonymous
Not applicable

I have difficulties to follow your description. May be some other people can help.

For the moment I can only speculate or to indivinate ...

In which query  du you have the error?

If you have some kind of loop that cycles on a list of 50 queries/table and for some reason the number of tables is smaller you could get some similar error ...

 

 

Another guess could be this:

 

with these expression

let
Source = Web.Page(Web.Contents("https://finance.yahoo.com/quote/DSY.jo/history/")),
Data2 = Source{2}[Data],

 

you try to get the tird element of a column.

If for some query you have less than 3 columns, you have an error.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors