Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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 ];
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 ];
Hi,
Thanks for your response.
The suggested solution is working for me.