Thirty_Noodles
New Member
- Joined
- Jan 14, 2025
- Messages
- 6
- Office Version
- 2024
- Platform
- Windows
Hello all,
Is it possible to make a power query dynamic? For eample, if part of the URL is changed (for example within the cell of a spreadsheet or similar? I have the following Power Query:
Part of this query highlighted below in red needs to vary (e.g. from 0116 to 0111A) and ideally, this would be controlled via a cell dropdown or similar.
"https://easytide.admiralty.co.uk/Home/GetPredictionData?stationId=0116"
Is this achievable?
Thanks for any advice.
Noodles
Is it possible to make a power query dynamic? For eample, if part of the URL is changed (for example within the cell of a spreadsheet or similar? I have the following Power Query:
Power Query:
let
Source = Json.Document(Web.Contents("https://easytide.admiralty.co.uk/Home/GetPredictionData?stationId=0116")),
tidalEventList = Source[tidalEventList],
#"Converted to Table" = Table.FromList(tidalEventList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"eventType", "dateTime", "height", "isApproximateTime", "isApproximateHeight", "date"}, {"Column1.eventType", "Column1.dateTime", "Column1.height", "Column1.isApproximateTime", "Column1.isApproximateHeight", "Column1.date"})
in
#"Expanded Column1"
Part of this query highlighted below in red needs to vary (e.g. from 0116 to 0111A) and ideally, this would be controlled via a cell dropdown or similar.
"https://easytide.admiralty.co.uk/Home/GetPredictionData?stationId=0116"
Is this achievable?
Thanks for any advice.
Noodles