Qlik Community

GeoAnalytics

Discussion Board for collaboration regarding Qlik GeoAnalytics.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Riccardo
Partner
Partner

TravelArea on the fly with variables

Hello,

in SaaS with GeoOperations, can I use TravelArea with variables? Like this

 

=GeoOperations.ScriptEvalStr('Select TravelArea from TravelAreas(costValue="$(V_POL_COST)", costUnit="$(V_POL_COST_UNIT)", transportation="$(V_POL_TRAS)")', '$(V_POL_LON_LAT)')

 

And the variables are written on input variables.

Thanks

Riccardo

Riccardo Schillaci
BI Technical Analyst
Datawarehouse & Business Intelligence
Labels (1)
1 Solution

Accepted Solutions
Riccardo
Partner
Partner
Author

It works fine, on Qlik Sense SaaS.

 

I'm able to generate a travelarea on the fly with input variables, without reload the app itself and without any table inside the script.

In the position field inside the area layer maps, put it:

=GeoOperations.ScriptEvalStr('Select TravelArea from TravelAreas(costValue="$(V_POL_COST)", costUnit="$(V_POL_COST_UNIT)", transportation="$(V_POL_TRAS)")', '$(V_POL_LON_LAT)')

and 4 input variables

V_POL_LON_LAT is for a Longitude and Latitude value (ex. [40.123,12.123])

 

Riccardo Schillaci
BI Technical Analyst
Datawarehouse & Business Intelligence

View solution in original post

4 Replies
Riccardo
Partner
Partner
Author

It works fine, on Qlik Sense SaaS.

 

I'm able to generate a travelarea on the fly with input variables, without reload the app itself and without any table inside the script.

In the position field inside the area layer maps, put it:

=GeoOperations.ScriptEvalStr('Select TravelArea from TravelAreas(costValue="$(V_POL_COST)", costUnit="$(V_POL_COST_UNIT)", transportation="$(V_POL_TRAS)")', '$(V_POL_LON_LAT)')

and 4 input variables

V_POL_LON_LAT is for a Longitude and Latitude value (ex. [40.123,12.123])

 

Riccardo Schillaci
BI Technical Analyst
Datawarehouse & Business Intelligence

View solution in original post

Patric_Nordstrom
Employee
Employee

See also more examples of using variables as input when using geooperations in runtime here:

https://community.qlik.com/t5/Qlik-GeoAnalytics-Documents/GeoOperations-Examples-Qlik-GeoAnalytics/t...

 

NashaYussof
Partner
Partner

I have tried! Nice one! Thanks for sharing @Riccardo 

nashayussof_0-1623416373394.png

 

Hi @Patric_Nordstrom 

Do you think we can do the same for geo-operation binning? Dynamic binning size based on user input  at the dashboard. I saw in documentation, binning operation is only supported in load scripts.

Patric_Nordstrom
Employee
Employee

@NashaYussof Binning is not supported in runtime. GeoOperations is based on SSE and in runtime the result is returned as an expression over a dimension. It's not possible to know beforehand how many bins are returned so hence it would be difficult to do it in runtime.