Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello trying to create a custom fuction off a weather API but having an issue with the funtion, I send the link with out Power bi and it is success full here is what I can
let sqltext = (Location as text, Date as text, Key as text ) =>
let
Source = Json.Document((Web.Contents("https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/"& Text.Split(Location, " ")(0) & "%20" & Text.Split(Location, " ")(1) &"/"& Date &"?unitGroup=metric&include=days&key="& Key &"&contentType=json")))
in
Source
in
sqltext
My error is
I have tried it with out using the sqltext and it did not work either.
Solved! Go to Solution.
Hi @JJCrone
I think it's because you are trying to access the List elements created by Text.Split but you've used () instead of {}
So change the braces to curly braces e.g. Text.Split(Location, " "){0}
regards
Phil
Proud to be a Super User!
Hi @JJCrone
I think it's because you are trying to access the List elements created by Text.Split but you've used () instead of {}
So change the braces to curly braces e.g. Text.Split(Location, " "){0}
regards
Phil
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |