Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adjusting a QlikView code to work in Qlik Sense

Hi, I have a code that works fine in QlikView, but I am not sure how to adjust it so it can work in Sense, since it requires creating a connection and making it available in the lib, but that implies if I connect to a web link then the URL will be static and I don't want that. I want to be able to pass a variable with different values to the connection. Below is the code in QlikView:

// Load relatives and friends locations
Relatives:
LOAD
"Family member" as Name,
Relation,
City
FROM
(
ooxml, embedded labels, table is Sheet1);

for i=1 to NoOfRows('Relatives')-1

let vCity=FieldValue('City',$(i));

weatherdata:
LOAD [forecast/time/day] as [time/day],
[forecast/time/clouds/value] as [clouds/value],
[forecast/time/clouds/all] as all,
[forecast/time/clouds/unit] as [clouds/unit],
[forecast/time/humidity/value] as [humidity/value],
[forecast/time/humidity/unit] as [humidity/unit],
[forecast/time/pressure/unit] as [pressure/unit],
[forecast/time/pressure/value] as [pressure/value],
[forecast/time/temperature/day] as [temperature/day],
[forecast/time/temperature/min] as min,
[forecast/time/temperature/max] as max,
[forecast/time/temperature/night] as night,
[forecast/time/temperature/eve] as eve,
[forecast/time/temperature/morn] as morn,
[forecast/time/windSpeed/mps] as mps,
[forecast/time/windSpeed/name] as [windSpeed/name],
[forecast/time/windDirection/deg] as deg,
[forecast/time/windDirection/code] as code,
[forecast/time/windDirection/name] as [windDirection/name],
[forecast/time/symbol/number] as number,
[forecast/time/symbol/name] as [symbol/name],
[forecast/time/symbol/var] as var,
[sun/rise] as rise,
[sun/set] as set,
[meta/calctime] as calctime,
[location/name] as City,
[location/country] as country,
[location/location/altitude] as altitude,
[location/location/latitude] as latitude,
[location/location/longitude] as longitude,
[location/location/geobase] as geobase,
[location/location/geobaseid] as geobaseid
FROM [http://api.openweathermap.org/data/2.5/forecast/daily?q=$(vCity)&mode=xml&units=metric&cnt=1&appid=9...] (XmlSimple, Table is [weatherdata]);

NEXT


This is the tricky part for me in Qlik Sense FROM [http://api.openweathermap.org/data/2.5/forecast/daily?q=$(vCity)&mode=xml&units=metric&cnt=1&appid=9...] (XmlSimple, Table is [weatherdata]);

Many thanks

4 Replies
swuehl
MVP
MVP

Not applicable
Author

Hi Stefan, this was straight forward, thank you I managed it

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!
Not applicable
Author

Hi Onno van, thanks for the message, I agree and wanted to do that but that button is not visible anymore! I saw yesterday but not today otherwise I will press it indeed this is a good help