Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum up the data to get rid of duplicate dimension combos

Hello,

I would appreciate hints/help to solve the following scripting related problem:


The data is loaded from several sources and I have problem as there are duplicate product-period-version combinations in the data.


Please see the tables below:

     - first table: how the data currently looks

     - second table: how the data should look.


How the data looks now:

ProductPeriodVersionAmount
A1Actual10
A1Actual10
A1Actual10
A2Actual10
A2Actual10
A3Actual10
A3Actual10
A3Actual10
A3Actual10
A4Actual10
A5Actual10
A6Actual10
A1Budget11
A1Budget11
A1Budget11
A2Budget11
A2Budget11
A3Budget11
A3Budget11
A4Budget11
A5Budget11
A6Budget11
A7Budget11
A7Budget11

How the data should look:

ProductPeriodVersionAmount
A1Actual30
A2Actual20
A3Actual40
A4Actual10
A5Actual10
A6Actual10
A1Budget33
A2Budget22
A3Budget22
A4Budget11
A5Budget11
A6Budget11
A7Budget22

Any hints appreciated!

Ossi

1 Solution

Accepted Solutions
sundarakumar
Specialist II
Specialist II

load it like

load

product,

period,

version,

sum(amount)

from

xyz

groupby period;

-Sundar

View solution in original post

3 Replies
sundarakumar
Specialist II
Specialist II

load it like

load

product,

period,

version,

sum(amount)

from

xyz

groupby period;

-Sundar

Not applicable
Author

Thanks for the hint. Group by it is..

I added all the rest of the dimensions to Group by line and it worked.

Problem solved. Have a nice weekend!

sundarakumar
Specialist II
Specialist II

Yeah missed a space...

Thanks a lot..

Have a great weekend...

-Sundar