Qlik Community

Community Corner

Discussion board for questions about the Qlik Community, its features, sharing information, general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Highlighted
zwyne
Contributor

Chart Title Expression

Hi All,

PFA,

Please assist with my expression for the chart title,

=if(GetCurrentSelections(Country)=0 and  GetCurrentSelections(BU)=0,'Evidence CA','Evidence CA'&'('&GetFieldSelections(BU)&')')  . 

So for example when I select BU='CIB' , the chart title is displayed as  Evidence CA(CIB), but when I select for Country ='Kenya', the chart displays Evidence CA(). How can write the expression which will cater for either Country or BU?

Thanks

 

 

 

1 Solution

Accepted Solutions

Re: Chart Title Expression

Try this

=If(GetSelectedCount(Country) = 0,
	If(GetSelectedCount(BU) = 0, 'Evidence CA', 'Evidence CA('& GetFieldSelections(BU) &')'),
	If(GetSelectedCount(BU) = 0, 'Evidence CA('& GetFieldSelections(Country) &')'))
5 Replies
agigliotti
Honored Contributor II

Re: Chart Title Expression

what does your expected result for Country = Kenya is ?
zwyne
Contributor

Re: Chart Title Expression

So I expect when I select Country ='Kenya'  in the listbox for example and my chart title displays Evidence CA(Kenya) and similarly if I select BU='CIB' in the listbox then my chart title displays Evidence CA (CIB). Same thing for  the IR Charts

 

agigliotti
Honored Contributor II

Re: Chart Title Expression

maybe this:
='Evidence CA' & '('&GetFieldSelections(Country)&GetFieldSelections(BU)&')'

Re: Chart Title Expression

Try this

=If(GetSelectedCount(Country) = 0,
	If(GetSelectedCount(BU) = 0, 'Evidence CA', 'Evidence CA('& GetFieldSelections(BU) &')'),
	If(GetSelectedCount(BU) = 0, 'Evidence CA('& GetFieldSelections(Country) &')'))
zwyne
Contributor

Re: Chart Title Expression

Thank you very much  Sunny, always a life saver