Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
helge_jorg
Creator
Creator

Adding a line layer in Qlik sense map – which format should the lines have?

Gents,

I would like to add a dataset of lines to a map. I have the data as polylines in arcgis. Does some have experience with adding lines to a map in Qlik sense and which format should the lines have? KLM files does not work.

Thanks!

Cheers

Helge

10 Replies
arulsettu
Master III
Master III

can you share the sample data.

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Helge.

Here is a quick example for you.

Add this to a new Qlik Sense app in the script:

Cities:

LOAD * INLINE [

    City, Country

    Oslo, Norway

    Stockholm, Sweden

    Copenhagen, Denmark

    Helsinki, Finland

];

Temp_Facts:

LOAD * INLINE [

    CityFrom, CityTo, Value

    Oslo, Stockholm, 8

    Stockholm, Copenhagen, 30

    Copenhagen, Helsinki, 44

];

Facts:

NoConcatenate

LOAD

*,

CityFrom AS City

Resident Temp_Facts;

Drop Table Temp_Facts;

Then for your layer settings do:

Line type

Dimension is City

Location StartPoint: CityFrom

Location EndPoint: CityTo

With By: Sum(Value)

That gives you this:

Capture.PNG

And you can play around with the settings afterwards.

Basically you need in your data model something that tells where something originated and where it is going to. Either by a name Qlik Sense can do lookups on or by adding a long / lat value so that you can use that.

Also added the app as an attachment.

Lykke til

helge_jorg
Creator
Creator
Author

Here is a .kmz file that i have exported from arcgis. But i don't have a qlik sense app since I cannot import lines to qlik.

helge_jorg
Creator
Creator
Author

Thanks Ali. But I need to import several lines to Qlik so I was wondering which format the lines should have. For points and areas, KML files works fine, but not for lines.

bwisealiahmad
Partner - Specialist
Partner - Specialist

I'm not sure what you mean by "format the lines should have".

The lines are formed between two places so you ned to know where does the line line originate from and where does it need to go to.

You shouldn't have to focus on what format the line has in an ArcGIS solution, instead see if you can in your data where a value originates and where it is going to and have this in your QlikSense data model.

Do you have this kind of info in the datamodel?

That is sufficient to create the line layers.

Not sure if I am misunderstanding?

helge_jorg
Creator
Creator
Author

With format I mean data type, like .excel or .KML

I have generated start, mid and end points for the line, but i still don't get Qlik to display the lines.

I have also created several points for the line (vertices) with coordinates. But it will only plot as points.

Thanks for helping me!

Please see attached app at the original post

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Could you share the Excel file with the row info for G1987 and the columns START_X, START_Y etc.

?

helge_jorg
Creator
Creator
Author

Yes, I have now attached the excel file to the original post.

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

I tried myself and can't get it to work 😕

It reads the point when using the GeoMakePoint() function, but not otherwise.


Find it strange.

Any input on this mto‌?

Best,

Ali A