Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Modifying a text object based on selection

Hi All,

I'm having a little problems trying to figure this out.  I have a text object with the following value.

Company : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I need the x's to be filled in based on my selections.  My selections are a drilldown.  Level1 Company, Level2 service line, Level3 Regions, Level4 Offices,

Any help would be appreciated.

Labels (1)
5 Replies
lockematthewp
Creator II
Creator II

I think what you are looking for is:

=[Level1 Company] & ', ' & [Level2 Service Line] & ', ' & …. 

or you could even determine this value in the script:

Load [Level1 Company],

[Level2 Service Line],

…,

[Level1 Company] & ', ' & [Level2 Service Line] & ', ' & …. as [Company],

...

From ...

tmumaw
Specialist II
Specialist II
Author

What I'm trying to achieve is this:

If they user selects Level1 only, then display Level1.  If the user selects Level1 and Level 2 display Level2, if the user selects Level1,Level2 and Level3 display Level3 and so on......

lockematthewp
Creator II
Creator II

= if (getselectedcount([Level4])>0, [Level4],

if (getselectedcount([Level3])>0, [Level3],

if (getselectedcount([Level2])>0, [Level2],

if (getselectedcount([Level1])>0, [Level1], '-'))))

tmumaw
Specialist II
Specialist II
Author

That works great.  One more question before the weekend starts.  I'm using a Cyclic Group for my drill actions.  Do you know if anyway to clear selections as you drill around?

Brett_Bleess
Former Employee
Former Employee

Hey Thom, have a look at this Design Blog, might give you another avenue with further functionality, best I have:

https://community.qlik.com/t5/Qlik-Design-Blog/Unbalanced-n-level-hierarchies/ba-p/1474325

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.