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

The 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.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors