// The holdings of one US ETF: https://tickerinside.com/spreadsheets/ // Data: TickerInside, CC BY 4.0. Questions: contact@tickerinside.com let Fund = "VOO", Response = Web.Contents("https://tickerinside.com", [ RelativePath = Text.Format("api/v1/fund/#[fund].csv", [fund = Text.Lower(Fund)]), ManualStatusHandling = {400, 404}]), Checked = if Value.Metadata(Response)[Response.Status] = 200 then Response else error Error.Record("TickerInside", Json.Document(Response)[message]), Rows = Csv.Document(Checked, [Delimiter = ",", Encoding = 65001, QuoteStyle = QuoteStyle.Csv]), Promoted = Table.PromoteHeaders(Rows, [PromoteAllScalars = true]), Typed = Table.TransformColumnTypes(Promoted, {{"weight_pct", type number}, {"holdings_as_of", type date}}, "en-US"), Securities = Table.PromoteHeaders(Csv.Document( Web.Contents("https://tickerinside.com", [ RelativePath = "api/v1/securities.csv"]), [Delimiter = ",", Encoding = 65001, QuoteStyle = QuoteStyle.Csv]), [PromoteAllScalars = true]), Indexed = Table.AddIndexColumn(Typed, "row", 1, 1), Joined = Table.NestedJoin(Indexed, {"ticker"}, Table.SelectColumns(Securities, {"ticker", "name"}), {"ticker"}, "security", JoinKind.LeftOuter), Named = Table.ExpandTableColumn(Joined, "security", {"name"}), Sorted = Table.RemoveColumns( Table.Sort(Named, {{"row", Order.Ascending}}), {"row"}) in Sorted