Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create a dynamic chart title

I want to create a chart title that dynamically changes as per the selection

I am new to QV and have gone through the existing blogs for it. but I am unable to figure out where in Chart do i need to getcurrentselection(). Can somebody please assist with the syntax and where do i need to add this in chart with the screenshots

1 Solution

Accepted Solutions
datanibbler
Champion
Champion

Hi,

on the tab "General" of the dialog of the chart, you have the edit_field "Title" (the topmost one)

=> Just click on the little button next to it (with the "...") and you have the formula_editor open

=> Just insert an IF() construct with the Getfieldselections() function - with the fieldname inside the brackets. That function will return the exact value (or text or whatever) that is currently selected, so you can query it.

=> Ex.: >> = IF(Getfieldselections([partnercode]) = 'spongebob', 'chart_squarepants', 'other chart) <<

(that is for only two possible alternatives. You can of course enter more by nesting several IF_constructs or using a PICK(MATCH()) function.

HTH

View solution in original post

5 Replies
datanibbler
Champion
Champion

Hi,

on the tab "General" of the dialog of the chart, you have the edit_field "Title" (the topmost one)

=> Just click on the little button next to it (with the "...") and you have the formula_editor open

=> Just insert an IF() construct with the Getfieldselections() function - with the fieldname inside the brackets. That function will return the exact value (or text or whatever) that is currently selected, so you can query it.

=> Ex.: >> = IF(Getfieldselections([partnercode]) = 'spongebob', 'chart_squarepants', 'other chart) <<

(that is for only two possible alternatives. You can of course enter more by nesting several IF_constructs or using a PICK(MATCH()) function.

HTH

Anonymous
Not applicable
Author

Hi

When i click on Windows Title little box (...) in the General Tab of the chart i.e the first box if condition doesnt get highligted. Am I doing something incorrect?


Anonymous
Not applicable
Author

Chart title issue.JPG

Adding screenshot

Anonymous
Not applicable
Author

Chart title issue.JPG

adding screenshot

Anonymous
Not applicable
Author

Hi

It worked.i did not add '=' sign.