Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
adurgani
Contributor III
Contributor III

Get field names from groups to change Variance column

IN the attached image, I have two grouped columns and the third column is a variance. I would like to change the name of the column dynamically based on what is selected in the group?

In the image, the variance column should say VAR ('June Forecast' - 'April Forecast') my formula is using the column(2) - Column(1) to calculate variance.


If the user changes his selection and changes column (1) to budget,  the variance column should say VAR ('June Forecast' - 'Budget')

8 Replies
jaumecf23
Creator III
Creator III

Try this:

GetCurrentField("Name_of_the_Group")

Anil_Babu_Samineni

Really tough to explain in each Group level. Perhaps this for Label?

Pick(Match(GetCurrentField('Cyclic Group Name')+1, 'Normal', 'variance column'), 'Budget', 'June Forecast - Budget')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
adurgani
Contributor III
Contributor III
Author

Jpg2.jpg

How do I find the name of the group?

adurgani
Contributor III
Contributor III
Author

The issue is it's not a cyclic group but an expression group. I cant seem to find anyone that has solved it in a way that a newbie like me can understand.

Anil_Babu_Samineni

Just for idea - You can give direct Label as dynamic to change when you select something like. Can you provide mock up and explain the outcome?

=If(FieldName = 'Selector', 'Budget', 'Normal')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
adurgani
Contributor III
Contributor III
Author

Attached an example to my original post. Let me know if there are any questions.

I want the variance column label to change dynamically based on the expressions names in column 1 and column 2

Thanks Anil!

Anil_Babu_Samineni

Interesting, Not entirely sure about investigation. Might be marcus_sommer

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
marcus_sommer

AFAIK there is no way to get the name/content of the active expression in an expression-group (maybe per macros but their use isn't recommended within the UI and it would be also not trivial to build such a routine).

This meant you need a different approach. This could be to convert the expression-groups into dimension-groups to be able to use getcurrentfield() or an outside control which expressions are displayed - per variables or probably better per field-selections. An example of it s in the Qlik Demo "What's new" and there are also multiple examples in the community: https://community.qlik.com/search.jspa?q=dynamic+charts&type=document.

- Marcus