Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Checkbox to include/exclude associated values from the calculation?

Hi,

I have two lists of companies: Parent Company and Children Company, Children Company has both Parents and Children values in it.

My client wants a checkbox saying include hierarchy, meaning that if they uncheck that box they only want to see Sum(Revenue) for the parent and not it's children.

To me it means that whatever is selected in the Parent Company should select the same value in Children company.

Example listboxes:

Parent Company

A

B

C

Children Company:

A

A1

A2

B

C

D

So I only want to have A selected from Children Company and disregard its children - A1 and A2.

Any idea?

2 Replies
Not applicable
Author

Hi Katarzyna

may be you can add a flag in your table when children = parent  use 1

then use that flag in expression

if(if Flag = 1, sum({<Flag={'1'}>} Revenue), sum(Revenue)

best regards

Chris

crusader_
Partner - Specialist
Partner - Specialist

Hi,

You can achieve this in several ways.

One of them described here Hierarchy and Hierarchy Belongs to

It helps to create hierarchical listbox.

Or you could just add 2 dimensions in your chart ParentCompany and Child Company and make them with conditional visible in QV11. You can check how to create such things in this file

Hope this helps.

Andrei