Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Certification Exam Sale - 40% off. Register by June 30, 2020. GET DETAILS
Highlighted
New Contributor

How to merge multiple rows into single row in qlikview

Hi,

I am struggling to merge multiple rows into single.

Please find below data

Material     Description                     Quantity

24                 Bolt                                    25

24                 Bolt                                      6

25                 Bush                                   10

26                Copper Cover                  2

26                Copper Cover                  6

Required output

Material     Description                     Quantity

24                 Bolt                                     31

25                 Bush                                   10

26                Copper Cover                   8

When I am using Straight table or pivot table I am getting  Required output . But My requirement is The requirement output should come in Table Box.

Please help me in this.

Thanks

Jay

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: How to merge multiple rows into single row in qlikview

Try to see file attached

View solution in original post

5 Replies
Highlighted
Partner
Partner

Re: How to merge multiple rows into single row in qlikview

Hi,

to do that you have to use group by in the script.

 

Load

Material

Description

Sum(Quantity) as Quantity

from ....

group by

Material,

Description

;

Highlighted
New Contributor

Re: How to merge multiple rows into single row in qlikview

Hi  StarinieriG,

Thanks for quick reply

But without giving quantity in group by  I am getting  'Invalid expression'  error.

Please help me

Thanks,

Jay

 

Highlighted
Partner
Partner

Re: How to merge multiple rows into single row in qlikview

It's because you can't keep Quantity as dimension.

If you want to keep each distinct rows, you could create a new table (using the script that I suggested before) and then call the sum(quantity) in another way

Highlighted
New Contributor

Re: How to merge multiple rows into single row in qlikview

Hi  StarinieriG,

According to you  I am getting doubled  the quantity as below

Material     Description                     Quantity

24                 Bolt                                     62

25                 Bush                                   10

26                Copper Cover                   16

Thanks

Jay

Highlighted
Partner
Partner

Re: How to merge multiple rows into single row in qlikview

Try to see file attached

View solution in original post