Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulm
Contributor III
Contributor III

Including selection

Hi,

I am using a hierarchical structure of data in which the layout is

Group -> Account

I want to know how can I make it so that when you select account it also selects Group. So basically select account will also select group.
I was thinking of toggle select, is this the right way to do this?

Any help is much appreciated,

PMcC

1 Solution

Accepted Solutions
Not applicable

I see - so when an account is selected you want to include the values of the entire associated group.

Something like this should work in the chart:

sum({1<GroupID={'$(=concat(distinct GroupID))'}>} [Column to be summed])

This does rely on only one account being selected so you may have to control that perhaps with 'always one selected value' for AccountID or condition the display of the chart to only show when one AccountID is selected using:

not(isnull(AccountID))

Hope this helps.

Gordon



View solution in original post

4 Replies
Not applicable

Not sure what you mean - if there is a link between the two tables (group id in both the Group and Account tables) then selecting an account will automatically select the associated group.

Regards,

Gordon

paulm
Contributor III
Contributor III
Author

Hey Gordon,

Thanks for the reply.

I think should explain the context of selection. I have a group id that has lots of seperate accounts assoicated with it. I have a report where I ignore the account ID, with the intention to do analysis over the entire group and not just an account.

So basically when a group has been selected the correct result is returned, when I select just an account then as I have programed for it to ignore all accounts, it therefore does the analysis on every account within our business.

What I would like is to select the assocaited group with an account ID when an ID is selected.

Many thanks,

Paul

Not applicable

I see - so when an account is selected you want to include the values of the entire associated group.

Something like this should work in the chart:

sum({1<GroupID={'$(=concat(distinct GroupID))'}>} [Column to be summed])

This does rely on only one account being selected so you may have to control that perhaps with 'always one selected value' for AccountID or condition the display of the chart to only show when one AccountID is selected using:

not(isnull(AccountID))

Hope this helps.

Gordon



paulm
Contributor III
Contributor III
Author

Hey,

Sorry for the late reply! The solution worked perfectly. Many thanks!