Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sumanta1234
Partner - Creator
Partner - Creator

Dynamic title based on selection

Hi All,

I would like to set the title of a bar chart based on the selected value.

I have used a drill down in dimension: Country>Industry>Business Area>Entity

Measure: Sum(Revenue)

When I select a country in the chart, The title will show Industry wise Revenue

When I select a Industry  in the chart, The title will show Business Area wise Revenue

When I select a Business Area in the chart, The title will show Entity wise Revenue

By default it will show Country wise Revenue

 

How to achieve this?

 

12 Replies
YoussefBelloum
Champion
Champion

Hi,

you can get your active dimension using the GetCurrentField() function.

If your drill down groupe is named: X

then you can get the active dimension with GetCurrentField(X)

then on the title expression you can try this:

GetCurrentField(X)&' wise Revenue'

formosasol
Partner - Contributor III
Partner - Contributor III

Hi,

You can use GetCurrentSelections as follows =GetCurrentSelections(City) & ' wise Revenue'.

You can see the results shown in the screen shot below

Dynamic Title1.jpg

Dynamic Title2.jpg

As you can see int he screenshot you see the title change by sate and by city

Regards

Frank

sumanta1234
Partner - Creator
Partner - Creator
Author

Getcurrentfield() function is not available in Qliksense.

sumanta1234
Partner - Creator
Partner - Creator
Author

GetCurrentSelections(City) & ' wise Revenue'. 

Is this work dynamically??

Anil_Babu_Samineni

I can think something like below?

If(Index(GetCurrentSelections(), 'Country'), 'Industry wise Revenue',

If(Index(GetCurrentSelections(), 'Industry'), 'Business Area wise Revenue',

If(Index(GetCurrentSelections(), 'Business Area'), 'Entity wise Revenue', 'Country Wise Revenue')))

 

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
sumanta1234
Partner - Creator
Partner - Creator
Author

I was using the below expression in the title of the chart.

If(GetSelectedCount(Country)>=1,'Industry',
If(GetSelectedCount(Industry)>=1,'Business Area',
If(GetSelectedCount([Business Area])>=1,'Entity','Country')))&' Wise Revenue'

 

But it was not working.

sumanta1234
Partner - Creator
Partner - Creator
Author

If(Index(GetCurrentSelections(), 'Country'), 'Industry wise Revenue',

If(Index(GetCurrentSelections(), 'Industry'), 'Business Area wise Revenue',

If(Index(GetCurrentSelections(), 'Business Area'), 'Entity wise Revenue', 'Country Wise Revenue')))

 

I have tried but when selecting industry it is not showing Business area wise revenue

Anil_Babu_Samineni

I think we need to calculate as "Permutation & Combination" rule like an example:

If(Index(GetCurrentSelections(), 'Country'), 'Industry wise Revenue',

If(Index(GetCurrentSelections(), 'Industry') and GetSelectedCount(Country)>0, 'Business Area wise Revenue',

If(Index(GetCurrentSelections(), 'Business Area') and GetSelectedCount(Country)>0 and GetSelectedCount(Industry)>0, 'Entity wise Revenue', 'Country Wise Revenue')))

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
sumanta1234
Partner - Creator
Partner - Creator
Author

Still not working