Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Using Total Value from Selection

Hi,

I'm trying to sum the value of another dimension, and put it in all rows in a calculated dimension. But, it just doesn't work properly regardless of many aggregate and sum functions I've tried. Any help would be really really appreciated.

Table 1:

pic 1.PNG

Table 2:

pic 2.PNG

As you can see, in Table 1, the PDCN "1125P" has 0 Wholesaler Inventory. But, I tried creating a sum total function across GeneralPDCN. Essentially, when I picked the GeneralPDCN as "11251' it showed up as 652 across all the rows like in Table 1 fifth column. But, I need to do this even when I am looking at just "1125P". Table 2 is incorrect. It needs to show '652' in the fifth column with the calculation.

In guidance and help would be greatly appreciated. Thank you!

1 Solution

Accepted Solutions
MVP
MVP

Re: Using Total Value from Selection

Can you try this:

=Sum({1} TOTAL <GeneralIPDCN> [Wholesaler Inventory]) * Avg(1)

or

=Sum({<PDCN>} TOTAL <GeneralIPDCN> [Wholesaler Inventory]) * Avg(1)

I am not sure if you want to ignore all selections or just PDCN. Based on what needs to be ignored, you can try one of the two expressions above.

2 Replies
MVP
MVP

Re: Using Total Value from Selection

Can you try this:

=Sum({1} TOTAL <GeneralIPDCN> [Wholesaler Inventory]) * Avg(1)

or

=Sum({<PDCN>} TOTAL <GeneralIPDCN> [Wholesaler Inventory]) * Avg(1)

I am not sure if you want to ignore all selections or just PDCN. Based on what needs to be ignored, you can try one of the two expressions above.

Not applicable

Re: Using Total Value from Selection

Thanks, Sunny! The second one worked exactly like I needed it too.

Community Browser