Forum Discussion

solarnstorage's avatar
solarnstorage
Regular Visitor
8 years ago
Solved

Parameters setting other parameters

Hi,   I want to show specific weather data for one city at a time, among a list of different cities, as requested by the user. The data grab works through a URL that has a numerical code for a spec...
  • HotChilli's avatar
    HotChilli
    8 years ago

    You must be quite close because haven't you already edited your M code to append the number (which is in the parameter) to the URL?

     

    You then have to add a line before 'Source = ..... ' in the advanced editor of your query which creates a new variable, something like           CityNo = if CityParameter = "Webster" then "4954677" else if CityParameter = "Mayer" then "5036896"

     

    You then use CityNo in the URL which gets assigned in the 'Source =' line.