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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Expression.Error: 7 arguments were passed to a function which expects between 1 and 2. Details: Pattern= Arguments=[List]

I am trying to pull in stock ticker data from google.com/finance for different stocks and have gotten the error -

"Expression.Error: 7 arguments were passed to a function which expects between 1 and 2. Details: Pattern= Arguments=[List]" 

My current query is the following -

let
Source = Web.BrowserContents("https://www.google.com/finance/quote/DAL:NYSE", "https://www.google.com/finance/quote/NI:NYSE", "https://www.google.com/finance/quote/DG:NYSE", "https://www.google.com/finance/quote/MSFT:NASDAQ", "https://www.google.com/finance/quote/BBY:NYSE", "https://www.google.com/finance/quote/GOOG:NASDAQ"),
#"Extracted Table From Html" = Html.Table(Source, {{"Ticker", ".PdOqHc"}, {"Price", "[jsname=""LXPcOd""]"}, {"Amount Change", ".ZYVHBb"}, {"Prev Close", ".gyFHrc:nth-last-child(9) > .P6K39c"}}, [RowSelector=".PdOqHc"]),
#"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Ticker", type text}, {"Price", type text}, {"Amount Change", type text}, {"Prev Close", type text}})
in
#"Changed Type"

 

I believe the issue stems from having multiple web browser contents, but not sure how else to pull in multiple stocks. Thanks in advance

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

It looks like the error message is indicating that the Web.BrowserContents function is expecting 1 or 2 arguments, but you are passing in 6.

Instead of using multiple Web.BrowserContents functions, you could try using the Web.Page function to load the page once and then extract the data for each stock ticker using a loop or list. Here's an example of how you could modify your query to use the Web.Page function:

let
  tickers = {"DAL:NYSE", "NI:NYSE", "DG:NYSE", "MSFT:NASDAQ", "BBY:NYSE", "GOOG:NASDAQ"},
  url = "https://www.google.com/finance/quote/",
  stockData = List.Transform(
    tickers,
    each
      let
        tickerUrl = url & _,
        page      = Web.Page(tickerUrl),
        table     = page{0}[Data]
      in
        table
  ),
  combinedData = Table.Combine(stockData)
in
  combinedData

This code creates a list of ticker symbols, constructs the URL for each ticker, loads the page using Web.Page, extracts the data table from each page, and then combines all of the tables into a single table.

 

Best regards,

Community Support Team_yanjiang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hi @Syndicate_Admin ,

I am not sure I understand this. I am a new power apps user. By applying the query you provided, it results in the following:

Are there additional steps I should be taking after applying your query into the editor in order to get the ticker, price, amount change, and previous close data from the website? Thanks in advance

 

 

v-yanjiang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

It looks like the error message is indicating that the Web.BrowserContents function is expecting 1 or 2 arguments, but you are passing in 6.

Instead of using multiple Web.BrowserContents functions, you could try using the Web.Page function to load the page once and then extract the data for each stock ticker using a loop or list. Here's an example of how you could modify your query to use the Web.Page function:

let
  tickers = {"DAL:NYSE", "NI:NYSE", "DG:NYSE", "MSFT:NASDAQ", "BBY:NYSE", "GOOG:NASDAQ"},
  url = "https://www.google.com/finance/quote/",
  stockData = List.Transform(
    tickers,
    each
      let
        tickerUrl = url & _,
        page      = Web.Page(tickerUrl),
        table     = page{0}[Data]
      in
        table
  ),
  combinedData = Table.Combine(stockData)
in
  combinedData

This code creates a list of ticker symbols, constructs the URL for each ticker, loads the page using Web.Page, extracts the data table from each page, and then combines all of the tables into a single table.

 

Best regards,

Community Support Team_yanjiang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors