Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
imrasyed
Partner - Creator II
Partner - Creator II

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
Creator II
Creator II

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.

View solution in original post

2 Replies
ChennaiahNallani
Creator III
Creator III

Can you share sample data

ishanbhatt
Creator II
Creator II

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.