Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

imrasyed
Contributor

Summing on multiple values

Hi Experts,

I have a territory No(Field From Dim table) and   consolidated territory no(Field from Fact table).

So I want to display the Sum of sales for  consolidated territory no but display only the Territory No .



Example:


For Consolidated Territory No: 200

we have Territory No --200,217.


So when i pull Territory No in pivot it should show 200 but the sum shd be for 200+217


Appreciate the help



Cheers





1 Solution

Accepted Solutions
ishanbhatt
Contributor II

Re: Summing on multiple values

Hi Imran,

In this scenario, you can add a field in both tables something like Type.

E.x

     Territory :

          Load

                    field1,

                    'Territory '      as Type

          from source;

     ConsolidatedTerritory :

          Load

                    field1,

                    'ConsolidatedTerritory '      as Type

          from source;

Now when you want to create a sum of any field then add set analysis.

     =Sum({<Type = {'Territory'}>} field1)

Hopefully, this will solve your problem.

2 Replies
ChennaiahNallani
Contributor III

Re: Summing on multiple values

Can you share sample data

ishanbhatt
Contributor II

Re: Summing on multiple values

Hi Imran,

In this scenario, you can add a field in both tables something like Type.

E.x

     Territory :

          Load

                    field1,

                    'Territory '      as Type

          from source;

     ConsolidatedTerritory :

          Load

                    field1,

                    'ConsolidatedTerritory '      as Type

          from source;

Now when you want to create a sum of any field then add set analysis.

     =Sum({<Type = {'Territory'}>} field1)

Hopefully, this will solve your problem.