Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jonah-vq
New Contributor III

Force sum on higher level

Hello,

I would like to force a sum on a certain level independant of the selections in a lower level.

Example:

   

GroupDetailValueValue forced
AA-1228
AA-2328
AA-3528
AA-4728
AA-51028
AA-6128

I can show the forced value for group A via the TOTAL function : sum(TOTAL<Group> value).

But if I do a selection within the group (select A-1 and A-2 for example), I would like to keep the 28, with the above formule it wil give the total of the selection (see below).

    

GroupDetailValueValue forcedValue with current function
AA-12285
AA-23285

In a dashboard i'd like to show the total value of A even if i only selected A-1

Thanks in advance for the help.

Jonah

Tags (2)
6 Replies

Re: Force sum on higher level

Try this:

Sum(TOTAL<Group> {<Detail>} value) * Avg(1)

saran7de
Contributor III

Re: Force sum on higher level

You can try:

Sum({1}TOTAL Value)

jonah-vq
New Contributor III

Re: Force sum on higher level

Hello,

Thanks Sunny for the answer, this partly gives me a solution but also creates another problem

(@ Saran, your solution only applies if A is the only group, which isn't the case.)

 

GroupDetailValueValue Group
AA-1210
AA-2310
AA-3510
BB-1718
BB-21018
BB-3118

When only selecting A-1, I would like to only see the blue line below, is there any way to obtain the view?

But with your formula I also get A-2 and A-3 as well as B-1, B-2 and B-3 with null values (i.e. it shows all groups without the Value but still shows them in the table).

 

GroupDetailValueValue Group
AA-1210
AA-20-
AA-30-
BB-10-
BB-20-
BB-30-

Thanks in advance

Jonah

Re: Force sum on higher level

Have you unchecked 'Show Zero Values' or is this checked? Uncheck it for me and see if that solves your issue

Capture.PNG

jonah-vq
New Contributor III

Re: Force sum on higher level

As a (happy) new Qlik User I'm still learning the basics the "Show zero values" resolved my issue, thanks a lot!

To improve my understanding of the tool Tool I have an additional question : What's the function of the *Avg(1) at the end of your proposed formula?

If I remove the "*Avg(1)" of the formula and uncheck the "Show zero values", I still have the above problem.

Re: Force sum on higher level

Since we are ignoring selection in Details field, QlikView will continue to show all rows when you select a single value under details. But to force them to be 0 we multiply it by Avg(1). Avg(1) will be equal to 1 for your selections and will equal to 0 out of your selections.

Community Browser