How to use equations in Power Query Editor, Advanced Editor

brandsand 1 Reputation point
2020-05-28T03:57:14.057+00:00

Within Advanced Editor, How do I correct this query to add the desired equation into the middle of the URL?

let
Source = Csv.Document(Web.Contents(
let today = DateTime.Date(DateTime.LocalNow()) in
"https://query1.finance.yahoo.com/v7/finance/download/%5EGSPC?period1=-2196633600&period2" &

Number.From=(Date.Day()*60*60*24)-((Date.Day(1970,1,1)*60*60*24))

&"interval=1d&events=history"), [Delimiter=",", Columns=7, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"Open", type number}, {"High", type number}, {"Low", type number}, {"Close", type number}, {"Adj Close", type number}, {"Volume", Int64.Type}}),
#"Reversed Rows" = Table.ReverseRows(#"Changed Type")

in
#"Reversed Rows"

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,970 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-05-28T12:13:06.99+00:00

    Power Query is not supported here on QnA. I'd try asking for help in dedicated forums here.

    https://social.technet.microsoft.com/Forums/en-US/home?forum=powerquery

    --please don't forget to Accept as answer if the reply is helpful--


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.