Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Specialist
Specialist

Retrieve label of selected field in drill_down group

I created a drill_down group containing 6 calculated fields.

To create a string_value I need to know which level of the group has been selected.

Using the getcurrentfield function gives the formula of the selected level.

When I use an expression like : =if(match(getcurrenfield(groupname), '=formula', fieldvalue1,

if(match(getcurrenfield(groupname), '=other formula',fieldvalue2, etc, etc

performance is very low

Other problem is that the formula contains the ' character.

Is there a possibility to retrieve the level or the label of the field selected in a group ?

I need the string_value in a Geoanalytics -> area layer-> label . Perhaps is there another way to reach my goal ?

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

I think you could outsource your logic into a variable:

var:
pick(match(getcurrentfield(groupname), 'x', 'y', 'z'), 'sum(F)', 'max(F)', 'avg(F)')

and then using this variable as expression:

$(var)

- Marcus

View solution in original post

2 Replies
marcus_sommer

I think you could outsource your logic into a variable:

var:
pick(match(getcurrentfield(groupname), 'x', 'y', 'z'), 'sum(F)', 'max(F)', 'avg(F)')

and then using this variable as expression:

$(var)

- Marcus

curiousfellow
Specialist
Specialist
Author

Thank you, that worked.