Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mohanraj94
Contributor III
Contributor III

Providing user an option to choose metrics as KPI on the map view

Hi All,

I am building a map view where size of the bubble depends on sales.

But, I am trying to give an user an option to change the sales to some other metrics.

In backend data we have separate column for each metrics.

If anyone help me with the steps required to achieve the above requirement it would be great

1 Solution

Accepted Solutions
Or
MVP
MVP

Create a field with values matching to the columns you want the user to pick from. Let's call it "FieldSelection". Ideally set it to Always one selected and default it (using a default bookmark or otherwise) to Sales, though you can work around this by using if() conditions to default to Sales if no value has been selected, or whatever you want.

Create a variable called vFieldSelection which is defined as =Only(FieldSelection) (not strictly necessary but easier to read and maintain IMO).

For your formula, use:

=['$(vFieldSelection)']

Qlik will automatically replace this with the text selected by the user, so you can use this inside other formulas as well such as Sum(['$(vFieldSelection)'] )

 

Sample data:


Load * INLINE [
Dim1, Value1, Value2
A, 1, 1
A, 2, 10
A, 3, 100
B, 9, 10
C, 2, 20
C, 5, 50
];

Load * INLINE [
FieldSelection
Value1
Value2 ];

 

Or_0-1614785130783.pngOr_1-1614785148011.png

 

View solution in original post

2 Replies
Or
MVP
MVP

Create a field with values matching to the columns you want the user to pick from. Let's call it "FieldSelection". Ideally set it to Always one selected and default it (using a default bookmark or otherwise) to Sales, though you can work around this by using if() conditions to default to Sales if no value has been selected, or whatever you want.

Create a variable called vFieldSelection which is defined as =Only(FieldSelection) (not strictly necessary but easier to read and maintain IMO).

For your formula, use:

=['$(vFieldSelection)']

Qlik will automatically replace this with the text selected by the user, so you can use this inside other formulas as well such as Sum(['$(vFieldSelection)'] )

 

Sample data:


Load * INLINE [
Dim1, Value1, Value2
A, 1, 1
A, 2, 10
A, 3, 100
B, 9, 10
C, 2, 20
C, 5, 50
];

Load * INLINE [
FieldSelection
Value1
Value2 ];

 

Or_0-1614785130783.pngOr_1-1614785148011.png

 

mohanraj94
Contributor III
Contributor III
Author

Hi,

Thanks for your response.

The suggested solution is working for me.